This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<application> | |
<activity android:name=".TaskKiller"/> | |
</application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Our demo fragment | |
*/ | |
public static class CircularRevealingFragment extends Fragment { | |
OnFragmentTouched listener; | |
public CircularRevealingFragment() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
~ Copyright (c) 2015 Upclose.me All rights reserved. | |
~ | |
~ 0000000 xx | |
~ 00000000 xxxx | |
~ 0000000000 xxl | |
~ 00000000000000 | |
~ 000000000000 | |
~ 00000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |