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
import android.content.Context; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class EmptyRecyclerView extends RecyclerView { |
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.chintansoni.android.mesamis.base; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.util.ArrayList; |
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
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.support.annotation.NonNull; | |
import android.text.Editable; | |
import android.text.Spannable; | |
import android.text.TextWatcher; | |
import android.text.style.ReplacementSpan; | |
public class ExpiryDateTextWatcher implements TextWatcher { | |
private int maxLength = 5; |
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
import android.graphics.Bitmap; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import com.squareup.picasso.Transformation; | |
public class CircleTransform implements Transformation { | |
private final int BORDER_COLOR = Color.WHITE; |
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 static class DatePickerFragment extends DialogFragment | |
implements DatePickerDialog.OnDateSetListener { | |
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
// Use the current date as the default date in the picker | |
final Calendar c = Calendar.getInstance(); | |
final int year = c.get(Calendar.YEAR); | |
final int month = c.get(Calendar.MONTH); | |
final int day = c.get(Calendar.DAY_OF_MONTH); |
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
(android.permission-group.CONTACTS) android.permission.READ_CONTACTS dangerous | |
(android.permission-group.CONTACTS) android.permission.WRITE_CONTACTS dangerous | |
(android.permission-group.CONTACTS) android.permission.READ_PROFILE dangerous | |
(android.permission-group.CONTACTS) android.permission.WRITE_PROFILE dangerous | |
(android.permission-group.CALENDAR) android.permission.READ_CALENDAR dangerous | |
(android.permission-group.CALENDAR) android.permission.WRITE_CALENDAR dangerous | |
(android.permission-group.SMS) android.permission.SEND_SMS dangerous | |
(android.permission-group.SMS) android.permission.RECEIVE_SMS dangerous | |
(android |
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
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 ARNAUD FRUGIER | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.RadioButton; | |
import android.widget.RadioGroup; | |
/** Extension of Android's RadioButton that restores CompoundButton's check toggling | |
* behavior, allowing a checked RadioButton to be unchecked by tapping on it again. */ | |
public class ToggleableRadioButton extends RadioButton { | |
public ToggleableRadioButton(Context context) { | |
super(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
public interface CustomItemClickListener { | |
public void onItemClick(View v, int position); | |
} |
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.gunhansancar.changelanguageexample.helper; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.os.Build; | |
import android.preference.PreferenceManager; |
OlderNewer