Skip to content

Instantly share code, notes, and snippets.

Thomas Wirth G00fY2

Block or report user

Report or block G00fY2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@G00fY2
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="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@G00fY2
G00fY2 / CircleTransformation.kt
Last active Oct 3, 2018
Circle image transformation for Picasso 3 which handles API 26+ hardware bitmaps
View CircleTransformation.kt
import android.graphics.Bitmap
import android.graphics.Bitmap.Config
import android.graphics.BitmapShader
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Shader
import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import com.squareup.picasso3.RequestHandler
import com.squareup.picasso3.Transformation
@G00fY2
G00fY2 / privacy_policy_template.md
Last active Oct 5, 2018
Basic privacy policy template for open source apps that do not collect any personal information
View privacy_policy_template.md

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
G00fY2 / .gitignore
Last active Jul 30, 2019
A current reference template to use for Android development collected from the official github and gitignore.io 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 https://gist.github.com/G00fY2/81c0aa67943cca021e915840bf73ee1b
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
@G00fY2
G00fY2 / CustomRxJava2CallAdapterFactory.java
Created Feb 19, 2019
CustomRxJava2CallAdapterFactory to transform HttpExceptions to custom error
View CustomRxJava2CallAdapterFactory.java
import com.google.gson.Gson;
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;
You can’t perform that action at this time.