Skip to content

Commit f9adbbb

Browse files
vanshikaaroramaskaravivek
authored andcommitted
Activity upload made full screen (commons-app#2370)
* graddle changes * upload activity changes * final commit
1 parent f6029be commit f9adbbb

File tree

4 files changed

+201
-204
lines changed

4 files changed

+201
-204
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,11 @@
3232
android:layout_below="@id/toolbar"
3333
android:gravity="bottom">
3434

35-
<include layout="@layout/activity_upload_top_card"/>
36-
37-
<include
38-
layout="@layout/activity_upload_right_card" />
3935

4036
<ViewFlipper
4137
android:id="@+id/view_flipper"
4238
android:layout_width="0dp"
43-
android:layout_height="wrap_content"
39+
android:layout_height="match_parent"
4440
android:clipChildren="false"
4541
android:measureAllChildren="false"
4642
app:layout_constraintBottom_toBottomOf="parent"
Lines changed: 200 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,211 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
5-
android:id="@+id/bottom_card"
65
android:layout_width="match_parent"
7-
android:layout_height="wrap_content"
8-
android:elevation="@dimen/cardview_default_elevation"
9-
android:orientation="vertical"
10-
tools:ignore="UnusedAttribute"
11-
tools:showIn="@layout/activity_upload">
12-
13-
<android.support.constraint.ConstraintLayout
14-
android:id="@+id/relativeLayout"
15-
android:layout_width="match_parent"
16-
android:layout_height="match_parent"
17-
android:padding="@dimen/small_gap">
6+
android:layout_height="match_parent">
187

19-
<TextView
20-
android:id="@+id/bottom_card_title"
21-
android:layout_width="wrap_content"
22-
android:layout_height="wrap_content"
23-
android:gravity="center_vertical"
24-
android:textSize="@dimen/normal_text"
25-
android:textStyle="bold"
26-
app:layout_constraintLeft_toLeftOf="parent"
27-
app:layout_constraintStart_toStartOf="parent"
28-
app:layout_constraintTop_toTopOf="parent"
29-
tools:text="Step 1 of 15" />
30-
31-
<TextView
32-
android:id="@+id/bottom_card_subtitle"
33-
android:layout_width="wrap_content"
34-
android:layout_height="wrap_content"
35-
android:gravity="center_vertical"
36-
android:textSize="@dimen/subtitle_text"
37-
app:layout_constraintTop_toBottomOf="@id/bottom_card_title"
38-
tools:text="1st image" />
39-
40-
<ImageButton
41-
android:id="@+id/bottom_card_expand_button"
42-
style="@style/Widget.AppCompat.Button.Borderless"
43-
android:layout_width="24dp"
44-
android:layout_height="24dp"
45-
android:padding="0dp"
46-
android:rotation="180"
47-
app:layout_constraintEnd_toEndOf="parent"
48-
app:layout_constraintRight_toRightOf="parent"
49-
app:layout_constraintTop_toTopOf="parent"
50-
app:srcCompat="@drawable/ic_expand_less_black_24dp" />
51-
52-
<fr.free.nrw.commons.widget.HeightLimitedRecyclerView
53-
android:id="@+id/rv_descriptions"
8+
<android.support.v7.widget.CardView
9+
android:id="@+id/top_card"
10+
android:layout_width="0dp"
11+
android:layout_height="wrap_content"
12+
android:layout_marginStart="8dp"
13+
android:layout_marginLeft="8dp"
14+
android:layout_marginTop="16dp"
15+
android:layout_marginEnd="8dp"
16+
android:layout_marginRight="8dp"
17+
android:layout_marginBottom="8dp"
18+
android:elevation="@dimen/cardview_default_elevation"
19+
app:layout_constraintStart_toStartOf="parent"
20+
app:layout_constraintTop_toTopOf="parent"
21+
tools:ignore="UnusedAttribute"
22+
tools:showIn="@layout/activity_upload">
23+
24+
<RelativeLayout
5425
android:layout_width="match_parent"
55-
android:layout_height="wrap_content"
56-
android:layout_marginBottom="8dp"
57-
android:layout_marginTop="8dp"
58-
app:layout_constraintBottom_toTopOf="@+id/bottom_card_previous"
59-
app:layout_constraintEnd_toEndOf="parent"
60-
app:layout_constraintStart_toStartOf="parent"
61-
app:layout_constraintTop_toBottomOf="@+id/bottom_card_subtitle"
62-
tools:visibility="gone"/>
63-
64-
<Button
65-
android:id="@+id/bottom_card_next"
66-
style="@style/Widget.AppCompat.Button.Borderless"
67-
android:layout_width="wrap_content"
68-
android:layout_height="wrap_content"
69-
android:text="@string/next"
70-
app:layout_constraintBottom_toBottomOf="parent"
71-
app:layout_constraintEnd_toEndOf="parent"
72-
app:layout_constraintRight_toRightOf="parent" />
73-
74-
<Button
75-
android:id="@+id/bottom_card_previous"
76-
style="@style/Widget.AppCompat.Button.Borderless"
77-
android:layout_width="wrap_content"
78-
android:layout_height="wrap_content"
79-
android:layout_marginEnd="@dimen/standard_gap"
80-
android:layout_marginRight="@dimen/standard_gap"
81-
android:text="@string/previous"
82-
app:layout_constraintBottom_toBottomOf="parent"
83-
app:layout_constraintEnd_toStartOf="@id/bottom_card_next"
84-
app:layout_constraintRight_toLeftOf="@id/bottom_card_next" />
85-
86-
<Button
87-
android:id="@+id/bottom_card_add_desc"
88-
style="@style/Widget.AppCompat.Button.Borderless"
26+
android:layout_height="wrap_content">
27+
28+
<TextView
29+
android:id="@+id/top_card_title"
30+
android:layout_width="wrap_content"
31+
android:layout_height="24dp"
32+
android:layout_alignParentStart="true"
33+
android:layout_alignParentLeft="true"
34+
android:layout_alignParentTop="true"
35+
android:layout_marginStart="@dimen/small_gap"
36+
android:layout_marginTop="@dimen/small_gap"
37+
android:layout_marginEnd="@dimen/small_gap"
38+
android:layout_marginBottom="@dimen/small_gap"
39+
android:gravity="center_vertical"
40+
android:textSize="@dimen/normal_text"
41+
android:textStyle="bold"
42+
tools:text="4 Uploads" />
43+
44+
<ImageButton
45+
android:id="@+id/top_card_expand_button"
46+
style="@style/Widget.AppCompat.Button.Borderless"
47+
android:layout_width="24dp"
48+
android:layout_height="24dp"
49+
android:layout_alignParentTop="true"
50+
android:layout_alignParentEnd="true"
51+
android:layout_alignParentRight="true"
52+
android:layout_marginStart="@dimen/small_gap"
53+
android:layout_marginTop="@dimen/small_gap"
54+
android:layout_marginEnd="@dimen/small_gap"
55+
android:layout_marginBottom="@dimen/small_gap"
56+
android:padding="0dp"
57+
app:srcCompat="@drawable/ic_expand_less_black_24dp" />
58+
59+
<android.support.v7.widget.RecyclerView
60+
android:id="@+id/top_card_thumbnails"
61+
android:layout_width="match_parent"
62+
android:layout_height="90dp"
63+
android:layout_below="@id/top_card_title"
64+
android:layout_marginBottom="@dimen/small_gap" />
65+
66+
</RelativeLayout>
67+
</android.support.v7.widget.CardView>
68+
69+
<android.support.v7.widget.CardView
70+
android:id="@+id/right_card"
71+
android:layout_width="wrap_content"
72+
android:layout_height="wrap_content"
73+
android:layout_marginEnd="8dp"
74+
android:layout_marginRight="8dp"
75+
android:layout_marginBottom="8dp"
76+
app:layout_constraintBottom_toTopOf="@+id/bottom_card"
77+
app:layout_constraintEnd_toEndOf="parent"
78+
app:layout_constraintTop_toBottomOf="@+id/top_card"
79+
tools:ignore="UnusedAttribute"
80+
tools:showIn="@layout/activity_upload">
81+
82+
<LinearLayout
83+
android:id="@+id/right_card_content"
8984
android:layout_width="wrap_content"
9085
android:layout_height="wrap_content"
91-
android:minWidth="48dp"
92-
android:text="+"
93-
app:layout_constraintBottom_toBottomOf="parent"
94-
app:layout_constraintStart_toStartOf="parent" />
86+
android:layout_centerVertical="true"
87+
android:orientation="vertical">
88+
89+
<ImageButton
90+
android:id="@+id/right_card_expand_button"
91+
style="@style/Widget.AppCompat.Button.Borderless"
92+
android:layout_width="16dp"
93+
android:layout_height="16dp"
94+
android:layout_margin="8dp"
95+
android:rotation="90"
96+
app:srcCompat="@drawable/ic_expand_less_black_24dp" />
97+
98+
<ImageButton
99+
android:id="@+id/right_card_map_button"
100+
android:layout_width="wrap_content"
101+
android:layout_height="wrap_content"
102+
android:layout_marginLeft="8dp"
103+
android:layout_marginRight="8dp"
104+
android:layout_marginBottom="8dp"
105+
android:visibility="visible"
106+
app:srcCompat="@drawable/ic_map_white_24dp" />
107+
108+
</LinearLayout>
109+
</android.support.v7.widget.CardView>
110+
111+
112+
<android.support.v7.widget.CardView
113+
android:id="@+id/bottom_card"
114+
android:layout_width="match_parent"
115+
android:layout_height="wrap_content"
116+
android:elevation="@dimen/cardview_default_elevation"
117+
android:orientation="vertical"
118+
app:layout_constraintBottom_toBottomOf="parent"
119+
app:layout_constraintEnd_toEndOf="parent"
120+
tools:ignore="UnusedAttribute"
121+
tools:showIn="@layout/activity_upload">
122+
123+
<android.support.constraint.ConstraintLayout
124+
android:id="@+id/relativeLayout"
125+
android:layout_width="match_parent"
126+
android:layout_height="match_parent"
127+
android:padding="@dimen/small_gap">
128+
129+
<TextView
130+
android:id="@+id/bottom_card_title"
131+
android:layout_width="wrap_content"
132+
android:layout_height="wrap_content"
133+
android:gravity="center_vertical"
134+
android:textSize="@dimen/normal_text"
135+
android:textStyle="bold"
136+
app:layout_constraintLeft_toLeftOf="parent"
137+
app:layout_constraintStart_toStartOf="parent"
138+
app:layout_constraintTop_toTopOf="parent"
139+
tools:text="Step 1 of 15" />
140+
141+
<TextView
142+
android:id="@+id/bottom_card_subtitle"
143+
android:layout_width="wrap_content"
144+
android:layout_height="wrap_content"
145+
android:gravity="center_vertical"
146+
android:textSize="@dimen/subtitle_text"
147+
app:layout_constraintTop_toBottomOf="@id/bottom_card_title"
148+
tools:text="1st image" />
149+
150+
<ImageButton
151+
android:id="@+id/bottom_card_expand_button"
152+
style="@style/Widget.AppCompat.Button.Borderless"
153+
android:layout_width="24dp"
154+
android:layout_height="24dp"
155+
android:padding="0dp"
156+
android:rotation="180"
157+
app:layout_constraintEnd_toEndOf="parent"
158+
app:layout_constraintRight_toRightOf="parent"
159+
app:layout_constraintTop_toTopOf="parent"
160+
app:srcCompat="@drawable/ic_expand_less_black_24dp" />
161+
162+
<fr.free.nrw.commons.widget.HeightLimitedRecyclerView
163+
android:id="@+id/rv_descriptions"
164+
android:layout_width="match_parent"
165+
android:layout_height="wrap_content"
166+
android:layout_marginTop="8dp"
167+
android:layout_marginBottom="8dp"
168+
app:layout_constraintBottom_toTopOf="@+id/bottom_card_previous"
169+
app:layout_constraintEnd_toEndOf="parent"
170+
app:layout_constraintStart_toStartOf="parent"
171+
app:layout_constraintTop_toBottomOf="@+id/bottom_card_subtitle"
172+
tools:visibility="gone" />
173+
174+
<Button
175+
android:id="@+id/bottom_card_next"
176+
style="@style/Widget.AppCompat.Button.Borderless"
177+
android:layout_width="wrap_content"
178+
android:layout_height="wrap_content"
179+
android:text="@string/next"
180+
app:layout_constraintBottom_toBottomOf="parent"
181+
app:layout_constraintEnd_toEndOf="parent"
182+
app:layout_constraintRight_toRightOf="parent" />
183+
184+
<Button
185+
android:id="@+id/bottom_card_previous"
186+
style="@style/Widget.AppCompat.Button.Borderless"
187+
android:layout_width="wrap_content"
188+
android:layout_height="wrap_content"
189+
android:layout_marginEnd="@dimen/standard_gap"
190+
android:layout_marginRight="@dimen/standard_gap"
191+
android:text="@string/previous"
192+
app:layout_constraintBottom_toBottomOf="parent"
193+
app:layout_constraintEnd_toStartOf="@id/bottom_card_next"
194+
app:layout_constraintRight_toLeftOf="@id/bottom_card_next" />
195+
196+
<Button
197+
android:id="@+id/bottom_card_add_desc"
198+
style="@style/Widget.AppCompat.Button.Borderless"
199+
android:layout_width="wrap_content"
200+
android:layout_height="wrap_content"
201+
android:minWidth="48dp"
202+
android:text="+"
203+
app:layout_constraintBottom_toBottomOf="parent"
204+
app:layout_constraintStart_toStartOf="parent" />
205+
206+
</android.support.constraint.ConstraintLayout>
207+
</android.support.v7.widget.CardView>
208+
</android.support.constraint.ConstraintLayout>
95209

96-
</android.support.constraint.ConstraintLayout>
97-
</android.support.v7.widget.CardView>
98210

99211

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

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)