mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Change disabled appearance of Nominate for Deletion button
This commit is contained in:
parent
4acf0e2ed4
commit
a449870d8b
4 changed files with 38 additions and 10 deletions
|
|
@ -306,6 +306,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
if (delete.getVisibility() == View.VISIBLE) {
|
||||
delete.setOnClickListener(v -> {
|
||||
delete.setEnabled(false);
|
||||
delete.setTextColor(getResources().getColor(R.color.deleteButtonLight));
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
|
||||
alert.setMessage("Why should this file be deleted?");
|
||||
final EditText input = new EditText(getActivity());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/deleteButtonColor"/>
|
||||
<corners android:radius="3dp" />
|
||||
<stroke android:width="5px" android:color="@color/deleteBackgroundColor" />
|
||||
</shape>
|
||||
<selector
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:state_enabled="true" >
|
||||
<shape
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="@color/deleteButton"/>
|
||||
<corners
|
||||
android:radius="3dp" />
|
||||
<stroke
|
||||
android:width="5px"
|
||||
android:color="@color/deleteRed" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:state_enabled="false" >
|
||||
<shape
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="@color/deleteButtonDark"/>
|
||||
<corners
|
||||
android:radius="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
||||
|
|
@ -253,7 +253,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/nominatedDeletionBanner"
|
||||
android:background="@color/deleteBackgroundColor"
|
||||
android:background="@color/deleteRed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
|
@ -281,8 +281,8 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/nominateDeletion"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:background="@drawable/bg_delete_button"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:layout_margin="@dimen/standard_gap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@
|
|||
<color name="primaryTextColor">#ffffff</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
|
||||
<color name="deleteBackgroundColor">#90960a0a</color>
|
||||
<color name="deleteButtonColor">#44000000</color>
|
||||
<color name="deleteRed">#90960a0a</color>
|
||||
<color name="deleteButton">#44000000</color>
|
||||
<color name="deleteButtonDark">#88000000</color>
|
||||
<color name="deleteButtonLight">#44ffffff</color>
|
||||
|
||||
<!-- Some colours are same for dark/light themes. They are written two times in case
|
||||
we want to change light ones later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue