This file contains hidden or 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 abstract class AbstractNetService<K> extends AsyncTaskLoader<K> { | |
private Bundle bundle; | |
private K mData; | |
public AbstractNetService(Context context, Bundle bundle) { | |
super(context); | |
this.bundle = bundle; | |
onContentChanged(); | |
} |
This file contains hidden or 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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.view.View; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.Canvas; | |
This file contains hidden or 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 RetryClickListener implements View.OnClickListener { | |
private int maxRetries; | |
private int current = 0; | |
private OnRetryClickListener onRetryClickListener; | |
public RetryClickListener(int maxRetries, OnRetryClickListener onRetryClickListener) { | |
this.maxRetries = maxRetries; | |
this.onRetryClickListener = onRetryClickListener; | |
} |
This file contains hidden or 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.alorma.github.ui.view; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.graphics.Typeface; | |
import android.os.Build; | |
import android.support.v4.view.PagerAdapter; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.util.TypedValue; |
This file contains hidden or 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
private class FakeAdapter extends RecyclerView.Adapter<FakeAdapter.VH> { | |
private final LayoutInflater inflater; | |
public FakeAdapter(Context context) { | |
this.inflater = LayoutInflater.from(context); | |
} | |
@Override | |
public VH onCreateViewHolder(ViewGroup parent, int viewType) { |
This file contains hidden or 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 void setIconDrawable(@NonNull Drawable iconDrawable) { | |
if (mIconDrawable != iconDrawable) { | |
mIcon = 0; | |
Bitmap bitmap = Bitmap.createBitmap(iconDrawable.getIntrinsicWidth(), iconDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(bitmap); | |
iconDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); | |
iconDrawable.draw(canvas); | |
mIconDrawable = new BitmapDrawable(getResources(), bitmap); | |
updateBackground(); |
This file contains hidden or 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
<resources> | |
<string name="app_name">WearFace</string> | |
<string name="hour_00">DOTZE</string> | |
<string name="hour_01">UNA</string> | |
<string name="hour_02">DUES</string> | |
<string name="hour_03">TRES</string> | |
<string name="hour_04">QUATRE</string> | |
<string name="hour_05">CINC</string> | |
<string name="hour_06">SIS</string> | |
<string name="hour_07">SET</string> |
This file contains hidden or 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 FontUtils { | |
public static void wrap(TextView textView) { | |
if (textView != null) { | |
try { | |
String fontName = FontUtils.fontName(textView); | |
if (fontName != null) { | |
Typeface typeface = Typeface.createFromAsset(textView.getContext().getAssets(), "fonts/" + fontName); | |
textView.setTypeface(typeface); | |
} |
This file contains hidden or 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 ObservableWebView extends WebView { | |
public ObservableWebView(Context context) { | |
this(context, null); | |
} | |
public ObservableWebView(Context context, AttributeSet attrs) { | |
this(context, attrs, 0); | |
} | |
public ObservableWebView(Context context, AttributeSet attrs, int defStyle) { |
This file contains hidden or 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
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.animation.AccelerateDecelerateInterpolator; | |
import com.nineoldandroids.animation.Animator; | |
import com.nineoldandroids.animation.IntEvaluator; | |
import com.nineoldandroids.animation.ObjectAnimator; | |
import com.nineoldandroids.animation.ValueAnimator; | |
/** |