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.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 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
/** | |
* @author Milap Tank | |
* @desc DateUtils.java is for | |
* @since 26/12/17 4:28 PM | |
*/ | |
public class DateUtils { |
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 static void startFragment(FragmentTransaction fragmentTransaction, BaseFragment fragment, | |
boolean withAnimation, boolean withBackStack, int fragmentContainerId) { | |
if (withAnimation) { | |
fragmentTransaction.setCustomAnimations(R.anim.fragment_slide_in_left, | |
R.anim.fragment_slide_out_left, R.anim.fragment_slide_in_right, | |
R.anim.fragment_slide_out_right); | |
} | |
fragmentTransaction.replace(fragmentContainerId, fragment, fragment.getTagText()); | |
if (withBackStack) { |
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
/** | |
* @author Milap Tank | |
BaseFragment.java is for | |
* @since 28/12/17 5:48 PM | |
*/ | |
public abstract class BaseFragment extends Fragment { | |
protected BaseActivity baseActivity; |
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
/** | |
* @author Milap Tank | |
* | |
* @desc FragmentContainerActivity.java is for | |
* @since 29/12/17 5:08 PM | |
*/ | |
public class FragmentContainerActivity extends BaseActivity implements AuthorizationService.TokenResponseCallback { |
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
/** | |
* @author Milap Tank | |
* | |
* @desc BaseActivity.java is for | |
* @since 26/12/17 6:08 PM | |
*/ | |
public abstract class BaseActivity extends AppCompatActivity { | |
private Toolbar toolbar; |
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.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 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.whyte.android.whytecatalogueapp.fragment; | |
import android.app.Dialog; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.DialogFragment; | |
import android.support.v7.app.AlertDialog; |
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.core.storage; | |
public class DbException extends Exception { | |
public DbException(String message) { | |
super(message); | |
} | |
} |
NewerOlder