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 | |
# Provide package of your application (com.example.myapp) | |
PACKAGE=$1 | |
# First, put your app to background and then run this script | |
echo "Killing $PACKAGE" | |
adb shell ps | grep $PACKAGE | awk '{print $2}' | xargs adb shell run-as $PACKAGE kill |
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 | |
# Provide package of your application (com.example.myapp) | |
PACKAGE=$1 | |
# First, put your app to background and then run this script | |
echo "Killing $PACKAGE" | |
adb shell ps | grep $PACKAGE | awk '{print $2}' | xargs adb shell run-as $PACKAGE kill |
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
package com.davidmedenjak.overlappinginvertview | |
import android.content.Context | |
import android.graphics.* | |
import android.util.AttributeSet | |
import android.view.View | |
import android.widget.FrameLayout | |
class InvertViewLayout(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) { |
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
// originally from https://gist.github.com/bclymer/f569fffb41bab046c2d1 | |
val realmStringArrayType = object : TypeToken<RealmStringArray>() {}.type | |
val gson = GsonBuilder() | |
.setExclusionStrategies(object : ExclusionStrategy { | |
override fun shouldSkipClass(clazz: Class<*>?): Boolean { | |
return false | |
} | |
override fun shouldSkipField(f: FieldAttributes?): Boolean { | |
return f?.declaringClass?.equals(RealmObject::class.java) == true |