Skip to content

Instantly share code, notes, and snippets.


Thomas Wirth G00fY2

View GitHub Profile
G00fY2 / Match parent view inside wrap content RelativeLayout
Last active May 4, 2018
match_parent like view inside wrap_content RelativeLayout
View Match parent view inside wrap content RelativeLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""
G00fY2 / CircleTransformation.kt
Last active Mar 10, 2020
Circle image transformation for Picasso 3 which handles API 26+ hardware bitmaps
View CircleTransformation.kt
import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import com.squareup.picasso3.RequestHandler
import com.squareup.picasso3.Transformation
G00fY2 /
Last active Oct 5, 2018
Basic privacy policy template for open source apps that do not collect any personal information

Privacy Policy

[author] built the app [app_name] as an open source app for use as is.

Your Privacy

I take your privacy seriously! That's why this app does NOT collect or share any personal information.

The app also does NOT use third party services that collect information used to identify you.

G00fY2 /
Created Feb 19, 2019
CustomRxJava2CallAdapterFactory to transform HttpExceptions to custom error
import io.reactivex.Completable;
import io.reactivex.Flowable;
import io.reactivex.Maybe;
import io.reactivex.MaybeSource;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.Scheduler;
import io.reactivex.Single;
import java.lang.annotation.Annotation;
G00fY2 / .gitignore
Last active Jun 2, 2020
A current reference template to use for Android development collected from the official github and templates. The template contains OS specific files (macOS, Linux, Windows) as well as files regarding the IDE (IntelliJ IDEA/Android Studio), gradle, Java, Kotlin, proguard, build artifacts, common plugins and many more.
View .gitignore
# Reference gitignore
# Built application files
# Files for the ART/Dalvik VM
G00fY2 / DependencyUpdates.kt
Last active May 25, 2020
gradle-versions-plugin Version Filter
View DependencyUpdates.kt
// in buildSrc
object DependencyUpdates {
private val nonstableFilter = listOf("alpha", "beta", "rc", "cr", "m", "preview")
private val maxSupportedVersionFilter = listOf(
Dependency("com.squareup.retrofit2", version = "2.6"),
Dependency("com.squareup.okhttp3", version = "3.12"),
Dependency("", "core", version = "3.3")
G00fY2 / gist:466703afe8c1007e50143221ca15c9ba
Last active Jun 30, 2020
Set JDK runtime across macOS
View gist:466703afe8c1007e50143221ca15c9ba
1. Get latest JBRSDK:
2. Unpack JDK to $HOME/Library/Java/jbrsdk-YOUR-VERSION
3. Run "sudo xattr -r -d /Users/twirth/Library/Java/jbrsdk-YOUR-VERSION" to disable quarantine attribute
3. Add JAVA_HOME="$HOME/Library/Java/jbrsdk-YOUR-VERSION/jdk/Contents/Home" to .bash_profile
4. Set Android Studio Runtime by adding studio.jdk with /Users/USERNAME/Library/Java/jbrsdk-YOUR-VERSION/jdk into $HOME/Library/Preferences/AndroidStudio4.0 or $HOME/Library/Application Support/Google/AndroidStudio4.x
5. Start Android Studio and check "About Andorid Studio" "Runtime version"
You can’t perform that action at this time.