mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
Merge pull request #1337 from diddypod/delete-request
Improve nominate for deletion feature
This commit is contained in:
commit
1bede8f729
8 changed files with 217 additions and 101 deletions
32
app/src/main/res/drawable/bg_delete_button.xml
Normal file
32
app/src/main/res/drawable/bg_delete_button.xml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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>
|
||||
|
|
@ -251,10 +251,38 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/small_gap" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/nominatedDeletionBanner"
|
||||
android:background="@color/deleteRed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/standard_gap"
|
||||
android:visibility="gone">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/nominated_for_deletion"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/seeMore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/nominated_see_more"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="@dimen/normal_text"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nominateDeletion"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:textColor="@color/deleteTextColor"
|
||||
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,7 +15,10 @@
|
|||
<color name="primaryTextColor">#ffffff</color>
|
||||
<color name="secondaryTextColor">#000000</color>
|
||||
|
||||
<color name="deleteTextColor">#d50000</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.
|
||||
|
|
|
|||
|
|
@ -233,6 +233,8 @@
|
|||
<string name="no_web_browser">No web browser found to open URL</string>
|
||||
<string name="null_url">Error! URL not found</string>
|
||||
<string name="nominate_deletion">Nominate for Deletion</string>
|
||||
<string name="nominated_for_deletion">This image has been nominated for deletion.</string>
|
||||
<string name="nominated_see_more"><u>See webpage for details</u></string>
|
||||
<string name="view_browser">View in Browser</string>
|
||||
|
||||
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue