Skip to content

Instantly share code, notes, and snippets.

View intrications's full-sized avatar

Michael Basil intrications

View GitHub Profile
@Takhion
Takhion / AndroidManifest.xml
Created June 1, 2015 16:34
Task killer for Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity android:name=".TaskKiller"/>
</application>
class LoginActivity extends Activity {
// Setup stuff
@Override
public void onResume() {
// Subscribe to the login view submit
AppObservable.bindActivity(this, loginView.getUserCredentialsObservable().subscribeOn(mainThread()))
.doOnNext(loginView.showProgress(true))
.flatMap(creds -> getTokenObservable(creds))
.subscribe(this::handleSuccess)
@ferdy182
ferdy182 / CircularRevealingFragment.java
Created March 27, 2015 17:18
Make circular reveal animations on a fragment
/**
* Our demo fragment
*/
public static class CircularRevealingFragment extends Fragment {
OnFragmentTouched listener;
public CircularRevealingFragment() {
}
@Aracem
Aracem / AndroidManifest.xml
Last active March 22, 2016 14:51
Speedup Compile time in debug enabling vmSafeMode. USe this Manifest in your debug folder
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 Upclose.me All rights reserved.
~
~ 0000000 xx
~ 00000000 xxxx
~ 0000000000 xxl
~ 00000000000000
~ 000000000000
~ 00000000
@Aracem
Aracem / AnimationViewUtils
Created March 19, 2015 15:40
Tada Animation from Cyrill Mottier
package com.aracem.utils.animation;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.Keyframe;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
@dmytrodanylyk
dmytrodanylyk / ShadowLayout.java
Last active August 29, 2015 14:15
ShadowLayout
public class ShadowLayout extends FrameLayout implements ViewGroup.OnHierarchyChangeListener {
private int mBackgroundColor;
private int mShadowColor;
private float mShadowRadius;
private float mCornerRadius;
private float mDx;
private float mDy;
private Paint mPaint;
@billmote
billmote / AndroidManifest.xml
Last active October 15, 2023 10:48 — forked from JakeWharton/gist:f50f3b4d87e57d8e96e9
When pushing code from your IDE, wake the device and show the activity.
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>
@JakeWharton
JakeWharton / gist:f50f3b4d87e57d8e96e9
Created February 7, 2015 01:59
Rise and Shine™, unlock and wake up your device automatically when you deploy from the IDE. Put this somewhere in your `src/debug/` code and run it when the application or main activity starts. Apache 2.
/**
* Show the activity over the lockscreen and wake up the device. If you launched the app manually
* both of these conditions are already true. If you deployed from the IDE, however, this will
* save you from hundreds of power button presses and pattern swiping per day!
*/
public static void riseAndShine(Activity activity) {
activity.getWindow().addFlags(FLAG_SHOW_WHEN_LOCKED);
PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE);
PowerManager.WakeLock lock =
package com.fewlaps.android.quitnow.base.customview;
import android.os.Handler;
import android.view.View;
/**
* A simple way to call the common new Handler().postDelayed(..., time);
* to show the Ripple animation completely and then run a Runnable. This class
* have to be used like a {@link android.view.View.OnClickListener}
*
@dmytrodanylyk
dmytrodanylyk / res_color_btn_flat_selector.xml
Last active March 4, 2023 07:52
Material Flat Button Style
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>