Merge pull request #1337 from diddypod/delete-request

Improve nominate for deletion feature
This commit is contained in:
neslihanturan 2018-03-26 23:30:42 +03:00 committed by GitHub
commit 1bede8f729
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 217 additions and 101 deletions

View 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>

View file

@ -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"

View file

@ -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.

View file

@ -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>