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
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
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources xmlns:tools="http://schemas.android.com/tools"> | |
<style name="CustomDialog" parent="@style/Base.Theme.AppCompat.Light.Dialog.FixedSize"> | |
<item name="android:windowCloseOnTouchOutside">false</item> | |
<item name="android:windowBackground">@android:color/transparent</item> | |
<item name="android:windowIsFloating">false</item> | |
<item name="android:windowIsTranslucent">true</item> | |
<item name="android:windowClipToOutline">false</item> |
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
#!/bin/bash | |
A_IMPORT="import com.amazon.geo.maps" | |
G_IMPORT="import com.google.android.maps" | |
A_VIEW="com.amazon.geo.maps.MapView" | |
G_VIEW="com.google.android.maps.MapView" | |
if [ "$1" = "a" ]; then | |
FR=$G_IMPORT |
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 IsPastTest { | |
public static final String SPAIN = "Europe/Madrid"; | |
public static final String PORTUGAL = "Europe/Lisbon"; | |
public boolean isPast(int year, int month, int day, int hour, int minute) { | |
return isPast(year, month, day, hour, minute, null); | |
} | |
public boolean isPast(int year, int month, int day, int hour, int minute, String timeZone) { |
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 NotificationThumbnailHelper { | |
private float targetWidth; | |
private float targetHeight; | |
public NotificationThumbnailHelper(Context context) { | |
targetWidth = getTargetWidth(context); | |
targetHeight = getTargetHeight(context); | |
} |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.2' | |
} | |
} | |
import twitter4j.* |