System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
apply from: rootProject.file('gradle/install-git-hooks.gradle') |
/* | |
Calculates the estimated brightness of an Android Bitmap. | |
pixelSpacing tells how many pixels to skip each pixel. Higher values result in better performance, but a more rough estimate. | |
When pixelSpacing = 1, the method actually calculates the real average brightness, not an estimate. | |
This is what the calculateBrightness() shorthand is for. | |
Do not use values for pixelSpacing that are smaller than 1. | |
*/ | |
public int calculateBrightnessEstimate(android.graphics.Bitmap bitmap, int pixelSpacing) { | |
int R = 0; int G = 0; int B = 0; | |
int height = bitmap.getHeight(); |
package com.example.fadeytextthingy; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Typeface; | |
import android.graphics.drawable.ColorDrawable; | |
import android.os.Bundle; | |
import android.support.v4.view.ViewCompat; |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
This document is based on the code of android-4.1.1_r6 (Jelly Bean).
First, the invalidate()
call will be propagated back to the root of the view hierarchy. During the propagation, the system determines the dirty area that needs to be redrawn. The propagation will eventually reach ViewRootImpl
.
frameworks/base/core/java/android/view/View.java
10219 void invalidate(boolean invalidateCache) {
... ...