This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on Android Nougat. Should work on previous versions of Android. | |
// It's ugly but should get the job done | |
/** | |
* Set the color of the handles when you select text in a | |
* {@link android.widget.EditText} or other view that extends {@link TextView}. | |
* | |
* @param view | |
* The {@link TextView} or a {@link View} that extends {@link TextView}. | |
* @param color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get SHA256 from PackageManager / PackageInfo / Signatures | |
*/ | |
fun printSignature() { | |
val packageManager: PackageManager = CONTEXT.getPackageManager() | |
val signature: Array<Signature> = packageManager.getPackageInfo("YOUR PACKAGE_NAME, LIKE com.xx.yy.zz", PackageManager.GET_SIGNATURES).signatures | |
signature.asIterable().forEach { | |
Log.i("SHA256", getFingerprint(it)) | |
} |