Skip to content

Instantly share code, notes, and snippets.

Thomas Wirth G00fY2

View GitHub Profile
@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;
@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 / 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 / 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"
You can’t perform that action at this time.