mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Make deletion-related views on MediaDetailFragment neater
This commit is contained in:
parent
085eea3d31
commit
a39d398edd
3 changed files with 29 additions and 12 deletions
|
|
@ -82,7 +82,8 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||||
private TextView license;
|
private TextView license;
|
||||||
private TextView coordinates;
|
private TextView coordinates;
|
||||||
private TextView uploadedDate;
|
private TextView uploadedDate;
|
||||||
private TextView nominatedforDeletion;
|
private TextView seeMore;
|
||||||
|
private LinearLayout nominatedforDeletion;
|
||||||
private LinearLayout categoryContainer;
|
private LinearLayout categoryContainer;
|
||||||
private Button delete;
|
private Button delete;
|
||||||
private ScrollView scrollView;
|
private ScrollView scrollView;
|
||||||
|
|
@ -137,7 +138,8 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||||
license = (TextView) view.findViewById(R.id.mediaDetailLicense);
|
license = (TextView) view.findViewById(R.id.mediaDetailLicense);
|
||||||
coordinates = (TextView) view.findViewById(R.id.mediaDetailCoordinates);
|
coordinates = (TextView) view.findViewById(R.id.mediaDetailCoordinates);
|
||||||
uploadedDate = (TextView) view.findViewById(R.id.mediaDetailuploadeddate);
|
uploadedDate = (TextView) view.findViewById(R.id.mediaDetailuploadeddate);
|
||||||
nominatedforDeletion = (TextView) view.findViewById(R.id.nominatedDeletionBanner);
|
seeMore = (TextView) view.findViewById(R.id.seeMore);
|
||||||
|
nominatedforDeletion = (LinearLayout) view.findViewById(R.id.nominatedDeletionBanner);
|
||||||
delete = (Button) view.findViewById(R.id.nominateDeletion);
|
delete = (Button) view.findViewById(R.id.nominateDeletion);
|
||||||
categoryContainer = (LinearLayout) view.findViewById(R.id.mediaDetailCategoryContainer);
|
categoryContainer = (LinearLayout) view.findViewById(R.id.mediaDetailCategoryContainer);
|
||||||
|
|
||||||
|
|
@ -349,7 +351,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (nominatedforDeletion.getVisibility() == View.VISIBLE){
|
if (nominatedforDeletion.getVisibility() == View.VISIBLE){
|
||||||
nominatedforDeletion.setOnClickListener(v -> {
|
seeMore.setOnClickListener(v -> {
|
||||||
openWebBrowser(media.getFilePageTitle().getMobileUri().toString());
|
openWebBrowser(media.getFilePageTitle().getMobileUri().toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,19 +251,33 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/small_gap" />
|
android:layout_height="@dimen/small_gap" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/nominatedDeletionBanner"
|
android:id="@+id/nominatedDeletionBanner"
|
||||||
android:background="@color/deleteBackgroundColor"
|
android:background="@color/deleteBackgroundColor"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="@dimen/tiny_gap"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/nominated_for_deletion"
|
|
||||||
android:textColor="@color/primaryTextColor"
|
|
||||||
android:padding="@dimen/standard_gap"
|
android:padding="@dimen/standard_gap"
|
||||||
android:textSize="@dimen/normal_text"
|
android:visibility="gone">
|
||||||
android:textStyle="bold"
|
<TextView
|
||||||
android:visibility="gone"/>
|
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
|
<Button
|
||||||
android:id="@+id/nominateDeletion"
|
android:id="@+id/nominateDeletion"
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,8 @@
|
||||||
<string name="no_web_browser">No web browser found to open URL</string>
|
<string name="no_web_browser">No web browser found to open URL</string>
|
||||||
<string name="null_url">Error! URL not found</string>
|
<string name="null_url">Error! URL not found</string>
|
||||||
<string name="nominate_deletion">Nominate for Deletion</string>
|
<string name="nominate_deletion">Nominate for Deletion</string>
|
||||||
<string name="nominated_for_deletion">This image has been nominated for deletion.\n\n<u>See webpage for details</u></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="view_browser">View in Browser</string>
|
||||||
|
|
||||||
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
<string name="nearby_location_has_not_changed">Location has not changed.</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue