Skip to content

Instantly share code, notes, and snippets.

View Zhuinden's full-sized avatar
🤔
Fighting Proguard

Gabor Varadi Zhuinden

🤔
Fighting Proguard
View GitHub Profile
@Zhuinden
Zhuinden / appkill.sh
Created April 24, 2020 22:14 — forked from mlykotom/appkill.sh
Script for killing Android app (as system would)
#!/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
@Zhuinden
Zhuinden / appkill.sh
Created April 24, 2020 22:14 — forked from mlykotom/appkill.sh
Script for killing Android app (as system would)
#!/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
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) {
@Zhuinden
Zhuinden / HttpClient.kt
Last active January 15, 2017 22:40 — forked from bclymer/HttpClient.kt
Kotlin Realm Primitive Arrays Workaround
// 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