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; | |
public class ConcatStringComparison { | |
static long timeAdding; | |
static long timeConcat; | |
static long timeStringBuffer; | |
static long timeStringBuilder; | |
public static final int ITERATIONS = 1000000; |
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 DebugClient extends DefaultHttpClient { | |
@Override | |
protected ClientConnectionManager createClientConnectionManager() { | |
KeyStore trustStore = null; | |
try { | |
trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); | |
trustStore.load(null, null); |
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 at.rocboron.android.widget; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.TextView; | |
import com.nineoldandroids.animation.ObjectAnimator; | |
import com.nineoldandroids.animation.ValueAnimator; | |
/** |
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.electroswingrevolution.util; | |
import android.app.UiModeManager; | |
import android.content.Context; | |
import android.content.res.Configuration; | |
import android.util.Log; | |
/** | |
* @author Roc Boronat ([email protected]) | |
* @date 27/06/2015 |
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 at.rocboron.android.utils; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.WindowManager; | |
import android.view.inputmethod.InputMethodManager; | |
public class SoftKeyboardUtil { |
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
int color = palette.getVibrantColor(defaultColor); | |
int r = (color >> 16) & 0xFF; | |
int g = (color >> 8) & 0xFF; | |
int b = (color >> 0) & 0xFF; | |
row.setBackgroundColor(color); | |
//@see http://stackoverflow.com/questions/12043187/how-to-check-if-hex-color-is-too-black | |
double luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; |
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.infojobs.app.base.view.fragment; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.app.Dialog; | |
import android.content.DialogInterface; | |
import android.os.Bundle; | |
import android.support.v4.app.DialogFragment; | |
import android.support.v4.app.FragmentActivity; | |
import android.view.LayoutInflater; |
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 String getDateMonthFromStrings(Context context, DateTime date) { | |
String result; | |
if (date.getMonthOfYear() == 1) { | |
result = context.getString(R.string.month_january); | |
} else if (date.getMonthOfYear() == 2) { | |
result = context.getString(R.string.month_february); | |
} else if (date.getMonthOfYear() == 3) { | |
result = context.getString(R.string.month_march); | |
} else if (date.getMonthOfYear() == 4) { | |
result = context.getString(R.string.month_april); |
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.infojobs.app.base.utils.animation; | |
import android.graphics.PointF; | |
import android.view.animation.Interpolator; | |
/** | |
* Derived from: https://github.com/rdallasgray/bez | |
*/ | |
public class CubicBezierInterpolator implements Interpolator { |
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); | |
* | |
* Created by Roc Boronat on 12/12/2014. | |
*/ | |
public class RippleDelayedRunner implements View.OnClickListener { |