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 TintableImageView extends ImageView { | |
| private ColorStateList tint; | |
| public TintableImageView(Context context) { | |
| super(context); | |
| } | |
| public TintableImageView(Context context, AttributeSet attrs) { | |
| super(context, attrs); |
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
| iconView.setColorFilter(getResources().getColor(R.color.primary_dark)); |
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
| <TextView | |
| android:id="@+id/menu_text" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| style="@style/Text.Title" | |
| android:textColor="@color/menu_selector" /> |
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
| AlertDialog alertDialog = new AlertDialog.Builder( | |
| getActivity(), | |
| R.style.AlertDialogCustom_Destructive) | |
| .setPositiveButton(R.string.button_delete, new DialogInterface.OnClickListener() { | |
| @Override | |
| public void onClick(DialogInterface dialogInterface, int i) { | |
| // Delete Action | |
| } | |
| }) | |
| .setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() { |
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
| <style name="AlertDialogCustom.Destructive"> | |
| <item name="android:buttonBarPositiveButtonStyle">@style/DestructiveButton</item> | |
| </style> | |
| <style name="DestructiveButton" | |
| parent="android:Widget.DeviceDefault.Button.Borderless"> | |
| <item name="android:textColor">@color/red</item> | |
| </style> |
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
| <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
| <item name="colorPrimary">@color/primary</item> | |
| <item name="colorPrimaryDark">@color/primary_dark</item> | |
| <item name="colorAccent">@color/accent</item> | |
| <item name="android:alertDialogTheme">@style/AlertDialogCustom</item> | |
| </style> |
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
| <style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog"> | |
| <item name="colorAccent">@color/primary</item> | |
| </style> |
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
| int[] attrs = new int[]{R.attr.selectableItemBackground}; | |
| TypedArray typedArray = getActivity().obtainStyledAttributes(attrs); | |
| int backgroundResource = typedArray.getResourceId(0, 0); | |
| view.setBackgroundResource(backgroundResource); |
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
| <View | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:background="?attr/selectableItemBackground" /> |
NewerOlder