Skip to content

Commit ee2b7be

Browse files
committed
1 parent b64ebbc commit ee2b7be

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ private void setTextFields(Media media) {
342342
*/
343343

344344
private void rebuildDepictionList() {
345+
depictionContainer.removeAllViews();
345346
for (int i = 0; i<depictions.size(); i++) {
346347
String depictionName = depictions.get(i).get("label");
347348
String depictionUrl = depictions.get(i).get("url");

app/src/main/res/layout/fragment_media_detail.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,30 +109,6 @@
109109
tools:text="Title of the media" />
110110
</LinearLayout>
111111

112-
<LinearLayout
113-
android:id="@+id/depicts_layout"
114-
android:layout_width="match_parent"
115-
android:layout_height="wrap_content"
116-
android:background="?attr/subBackground"
117-
android:orientation="vertical"
118-
android:padding="@dimen/standard_gap">
119-
120-
<TextView
121-
android:layout_width="match_parent"
122-
android:layout_height="wrap_content"
123-
android:paddingBottom="@dimen/tiny_gap"
124-
android:text="@string/media_detail_depiction"
125-
android:textColor="@android:color/white"
126-
android:textSize="@dimen/normal_text"
127-
android:textStyle="bold" />
128-
129-
<LinearLayout
130-
android:id="@+id/media_detail_depiction_container"
131-
android:layout_width="match_parent"
132-
android:layout_height="wrap_content"
133-
android:orientation="vertical" />
134-
</LinearLayout>
135-
136112
<fr.free.nrw.commons.media.MediaDetailSpacer
137113
android:layout_width="match_parent"
138114
android:layout_height="@dimen/small_gap" />
@@ -274,6 +250,30 @@
274250
android:layout_width="match_parent"
275251
android:layout_height="@dimen/small_gap" />
276252

253+
<LinearLayout
254+
android:id="@+id/depicts_layout"
255+
android:layout_width="match_parent"
256+
android:layout_height="wrap_content"
257+
android:background="?attr/subBackground"
258+
android:orientation="vertical"
259+
android:padding="@dimen/standard_gap">
260+
261+
<TextView
262+
android:layout_width="match_parent"
263+
android:layout_height="wrap_content"
264+
android:paddingBottom="@dimen/tiny_gap"
265+
android:text="@string/media_detail_depiction"
266+
android:textColor="@android:color/white"
267+
android:textSize="@dimen/normal_text"
268+
android:textStyle="bold" />
269+
270+
<LinearLayout
271+
android:id="@+id/media_detail_depiction_container"
272+
android:layout_width="match_parent"
273+
android:layout_height="wrap_content"
274+
android:orientation="vertical" />
275+
</LinearLayout>
276+
277277
<LinearLayout
278278
android:layout_width="match_parent"
279279
android:layout_height="wrap_content"

0 commit comments

Comments
 (0)