Skip to content

Commit 8fc7f79

Browse files
committed
Basic Structure Implemented
1 parent 6744940 commit 8fc7f79

File tree

3 files changed

+150
-14
lines changed

3 files changed

+150
-14
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ dependencies {
6868
testImplementation 'org.robolectric:robolectric:3.7.1'
6969
testImplementation 'com.nhaarman:mockito-kotlin:1.5.0'
7070
testImplementation 'com.squareup.okhttp3:mockwebserver:3.8.1'
71+
compile 'com.dinuscxj:circleprogressbar:1.1.1'
7172

7273
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
7374
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.8.1'

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

Lines changed: 147 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,126 @@
1414
layout="@layout/toolbar"
1515
android:layout_width="match_parent"
1616
android:layout_height="wrap_content" />
17-
<LinearLayout
17+
18+
<RelativeLayout
1819
android:layout_width="match_parent"
1920
android:layout_height="0dp"
20-
android:layout_weight="1.5"
21+
android:layout_weight="1.8"
22+
android:orientation="vertical"
2123
android:layout_below="@+id/toolbar"
2224
android:background="#D6DCE0">
25+
<TextView
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
style="?android:textAppearanceLarge"
29+
android:layout_marginTop="@dimen/activity_margin_horizontal"
30+
android:layout_marginStart="@dimen/activity_margin_horizontal"
31+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
32+
android:text="@string/level"/>
2333

24-
</LinearLayout>
34+
<ImageView
35+
android:layout_width="wrap_content"
36+
android:layout_height="wrap_content"
37+
android:layout_marginVertical="@dimen/activity_margin_vertical"
38+
android:id="@+id/achievement_badge"
39+
android:layout_above="@+id/layout_image_uploaded"
40+
android:layout_marginBottom="@dimen/activity_margin_vertical"
41+
android:layout_centerHorizontal="true"/>
42+
<RelativeLayout
43+
android:layout_width="match_parent"
44+
android:layout_height="wrap_content"
45+
android:id="@+id/layout_image_uploaded"
46+
android:layout_above="@+id/layout_image_reverts"
47+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
48+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
49+
android:layout_marginRight="@dimen/activity_margin_horizontal"
50+
android:layout_marginStart="@dimen/activity_margin_horizontal">
51+
<TextView
52+
android:layout_width="wrap_content"
53+
android:layout_height="wrap_content"
54+
style="?android:textAppearanceMedium"
55+
android:layout_marginTop="@dimen/activity_margin_horizontal"
56+
android:layout_marginStart="@dimen/activity_margin_horizontal"
57+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
58+
android:text="@string/images_uploaded"/>
59+
<com.dinuscxj.progressbar.CircleProgressBar
60+
android:layout_marginTop="4dp"
61+
android:progress="50"
62+
app:style="solid_line"
63+
android:layout_alignParentRight="true"
64+
android:layout_marginHorizontal="@dimen/activity_margin_horizontal"
65+
app:progress_text_format_pattern="12/24"
66+
app:progress_stroke_width="3dp"
67+
app:progress_start_color="#3A3381"
68+
app:progress_end_color="#8C8B98"
69+
android:layout_width="50dp"
70+
android:layout_height="50dp" />
71+
72+
73+
</RelativeLayout>
74+
<RelativeLayout
75+
android:layout_width="match_parent"
76+
android:layout_height="wrap_content"
77+
android:id="@+id/layout_image_reverts"
78+
android:layout_above="@+id/layout_image_used_by_wiki"
79+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
80+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
81+
android:layout_marginRight="@dimen/activity_margin_horizontal"
82+
android:layout_marginStart="@dimen/activity_margin_horizontal">
83+
<TextView
84+
android:layout_width="wrap_content"
85+
android:layout_height="wrap_content"
86+
style="?android:textAppearanceMedium"
87+
android:layout_marginTop="@dimen/activity_margin_horizontal"
88+
android:layout_marginStart="@dimen/activity_margin_horizontal"
89+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
90+
android:text="@string/images_uploaded"/>
91+
<com.dinuscxj.progressbar.CircleProgressBar
92+
android:layout_marginTop="4dp"
93+
android:progress="50"
94+
app:style="solid_line"
95+
android:layout_alignParentRight="true"
96+
android:layout_marginHorizontal="@dimen/activity_margin_horizontal"
97+
app:progress_text_format_pattern="12/24"
98+
app:progress_stroke_width="3dp"
99+
app:progress_start_color="#3A3381"
100+
app:progress_end_color="#8C8B98"
101+
android:layout_width="50dp"
102+
android:layout_height="50dp" />
103+
</RelativeLayout>
104+
<RelativeLayout
105+
android:layout_width="match_parent"
106+
android:layout_height="wrap_content"
107+
android:id="@+id/layout_image_used_by_wiki"
108+
android:layout_marginBottom="@dimen/activity_margin_vertical"
109+
android:layout_alignParentBottom="true"
110+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
111+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
112+
android:layout_marginRight="@dimen/activity_margin_horizontal"
113+
android:layout_marginStart="@dimen/activity_margin_horizontal">
114+
<TextView
115+
android:layout_width="wrap_content"
116+
android:layout_height="wrap_content"
117+
style="?android:textAppearanceMedium"
118+
android:layout_marginTop="@dimen/activity_margin_horizontal"
119+
android:layout_marginStart="@dimen/activity_margin_horizontal"
120+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
121+
android:text="@string/images_uploaded"/>
122+
<com.dinuscxj.progressbar.CircleProgressBar
123+
android:layout_marginTop="4dp"
124+
android:progress="50"
125+
app:style="solid_line"
126+
android:layout_alignParentRight="true"
127+
android:layout_marginHorizontal="@dimen/activity_margin_horizontal"
128+
app:progress_text_format_pattern="12/24"
129+
app:progress_stroke_width="2.5dp"
130+
app:progress_start_color="#3A3381"
131+
app:progress_end_color="#8C8B98"
132+
android:layout_width="50dp"
133+
android:layout_height="50dp" />
134+
</RelativeLayout>
135+
136+
</RelativeLayout>
25137
<LinearLayout
26138
android:layout_width="match_parent"
27139
android:layout_height="0dp"
@@ -35,12 +147,12 @@
35147
style="?android:textAppearanceLarge"
36148
android:layout_marginLeft="@dimen/activity_margin_horizontal"
37149
android:layout_marginTop="@dimen/activity_margin_vertical"/>
38-
<LinearLayout
39-
android:layout_width="wrap_content"
150+
<RelativeLayout
151+
android:layout_width="match_parent"
40152
android:layout_height="wrap_content"
41-
android:layout_marginEnd="@dimen/activity_margin_horizontal"
42153
android:layout_marginLeft="@dimen/activity_margin_horizontal"
43154
android:layout_marginRight="@dimen/activity_margin_horizontal"
155+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
44156
android:layout_marginStart="@dimen/activity_margin_horizontal"
45157
android:layout_marginTop="@dimen/activity_margin_horizontal">
46158
<ImageView
@@ -53,35 +165,57 @@
53165
android:layout_width="wrap_content"
54166
android:layout_height="wrap_content"
55167
style="?android:textAppearanceMedium"
168+
android:layout_toRightOf="@+id/featured_image_icon"
56169
android:layout_marginTop="@dimen/activity_margin_horizontal"
57170
android:layout_marginStart="@dimen/activity_margin_horizontal"
58171
android:layout_marginLeft="@dimen/activity_margin_horizontal"
59172
android:text="@string/statistics_featured"/>
173+
<TextView
174+
android:layout_width="wrap_content"
175+
android:layout_height="wrap_content"
176+
style="?android:textAppearanceMedium"
177+
android:layout_alignParentRight="true"
178+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
179+
android:layout_marginTop="@dimen/activity_margin_horizontal"
180+
android:layout_marginStart="@dimen/activity_margin_horizontal"
181+
android:text="2"
182+
android:layout_marginLeft="@dimen/activity_margin_horizontal" />
60183

61-
</LinearLayout>
62-
<LinearLayout
63-
android:layout_width="wrap_content"
184+
</RelativeLayout>
185+
<RelativeLayout
186+
android:layout_width="match_parent"
64187
android:layout_height="wrap_content"
65-
android:layout_marginEnd="@dimen/activity_margin_horizontal"
66188
android:layout_marginLeft="@dimen/activity_margin_horizontal"
189+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
67190
android:layout_marginRight="@dimen/activity_margin_horizontal"
68-
android:layout_marginStart="@dimen/activity_margin_horizontal"
69-
android:layout_marginTop="@dimen/activity_margin_horizontal">
191+
android:layout_marginStart="@dimen/activity_margin_horizontal">
70192
<ImageView
71193
android:layout_width="@dimen/overflow_icon_dimen"
72194
android:layout_height="@dimen/overflow_icon_dimen"
73195
app:srcCompat="@drawable/ic_thanks"
196+
android:id="@+id/thanks_image_icon"
74197
android:scaleType="centerCrop"
75198
/>
76199
<TextView
77200
android:layout_width="wrap_content"
78201
android:layout_height="wrap_content"
79202
style="?android:textAppearanceMedium"
80203
android:layout_marginTop="@dimen/activity_margin_horizontal"
204+
android:layout_toRightOf="@+id/thanks_image_icon"
81205
android:layout_marginStart="@dimen/activity_margin_horizontal"
82206
android:layout_marginLeft="@dimen/activity_margin_horizontal"
83207
android:text="@string/statistics_thanks"/>
84-
</LinearLayout>
208+
<TextView
209+
android:layout_width="wrap_content"
210+
android:layout_height="wrap_content"
211+
style="?android:textAppearanceMedium"
212+
android:layout_alignParentRight="true"
213+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
214+
android:layout_marginTop="@dimen/activity_margin_horizontal"
215+
android:layout_marginStart="@dimen/activity_margin_horizontal"
216+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
217+
android:text="2"/>
218+
</RelativeLayout>
85219

86220
</LinearLayout>
87221

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,5 +288,6 @@
288288
<string name="statistics">STATISTICS</string>
289289
<string name="statistics_thanks">Thanks Received</string>
290290
<string name="statistics_featured">Featured Images</string>
291-
291+
<string name="level">LEVEL</string>
292+
<string name="images_uploaded">Images Uploaded</string>
292293
</resources>

0 commit comments

Comments
 (0)