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
public void onCreate() { | |
... | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { | |
String processName = getProcessName(this); | |
String packageName = this.getPackageName(); | |
if (!packageName.equals(processName)) { | |
WebView.setDataDirectorySuffix(processName); | |
} | |
} | |
} |
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
private void initSQLiteDetectLeakedObjects() { | |
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() | |
.detectLeakedSqlLiteObjects() | |
.detectLeakedClosableObjects() | |
.penaltyLog() | |
.penaltyDeath() | |
.build()); | |
} |
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
companion object { | |
private var INSTANCE: Repository? = null | |
val instance: Repository? | |
get() { | |
if (INSTANCE == null) { | |
synchronized(Repository::class.java) { | |
if (INSTANCE == null) { | |
INSTANCE = | |
Repository() | |
} |
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
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
for entry in "$DIR"/* | |
do | |
if [[ "$entry" != *"/drawable"* ]] && [[ "$entry" == *"/resource-designer/res/"* ]] | |
then | |
#remove all folder != drawable* | |
rm -rf "$entry" | |
else | |
# remove all file xml |
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
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew install android-platform-tools | |
https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x |
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
<merge xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" | |
tools:showIn="@layout/fragment_layout"> | |
... | |
</merge> | |
https://stackoverflow.com/questions/57070747/how-can-you-use-tools-in-android-layout-to-replace-a-merge-item-for-designer |
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
-repackageclasses '' | |
#Optimization Option | |
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* | |
-optimizationpasses 5 | |
#Annotation | |
-keepattributes *Annotation* | |
-keep @interface com.google.gson.annotations.* |
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
productFlavors{ | |
vDevelop_Auto_Increment_Version { | |
buildConfigField "long", "BUILD_DATE", System.currentTimeMillis() + "L" | |
buildConfigField "boolean", "DEBUG_MODE", "true" | |
buildConfigField "boolean", "ENABLE_FORCE_UPDATE", "false" | |
dimension "dimen" | |
versionName "develop" | |
def versionPropsFile = file('version.properties') |
NewerOlder