Skip to content

Instantly share code, notes, and snippets.

View nuptboyzhb's full-sized avatar
😀
I may be slow to respond.

nuptboyzhb nuptboyzhb

😀
I may be slow to respond.
View GitHub Profile
@chethann
chethann / WebviewResourceMappingHelper.java
Created November 24, 2017 09:19
WebviewResourceMappingHelper Sample Code
package com.test.android.helpers;
import android.os.Build;
import android.webkit.WebResourceResponse;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.test.android.Application;
import org.apache.commons.collections.CollectionUtils;
@danielgomezrico
danielgomezrico / .gitlab-ci.yml
Last active June 16, 2020 11:47
Android / Gitlab ci - sample setup files to setup your own local gitlab runner with real physical android devices. Check https://github.com/caipivara/awesome-android-scripts
stages:
- build
- test
- deploy
variables:
GIT_STRATEGY: clone
cache:
key: ${CI_PROJECT_ID}
configuration(orientation = Orientation.LANDSCAPE, smallestWidth = 700) {
recyclerView {
init()
}.lparams(width = widthProcent(50), height = matchParent)
frameLayout().lparams(width = matchParent, height = matchParent)
}
fun <T : View> T.widthProcent(procent: Int): Int =
getAppUseableScreenSize().x.toFloat().times(procent.toFloat() / 100).toInt()
@Jogan
Jogan / FloatingActionButton.java
Last active December 4, 2023 12:48
Implementation of Android L's floating action button pattern. API 14+
package your_package;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;