Skip to content

Commit 48ad778

Browse files
authored
๐Ÿ”€ #25 from boostcampwm-2022/feat/myrun_layout
datastore์— ์ตœ์ดˆ ๋กœ๊ทธ์ธํ•œ ์œ ์ €์˜ uid, email, nickname, profile ์ด๋ฏธ์ง€ uri ์ €์žฅ, ๋งˆ์ด๋Ÿฐ, ์„ค์ • ํŽ˜์ด์ง€ ๋ ˆ์ด์•„์›ƒ ์ž‘์„ฑ
2 parents 0c2a789 + 90c8f53 commit 48ad778

22 files changed

+392
-32
lines changed

โ€Žapp/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
android:name=".MogakrunApplication"
1515
tools:targetApi="31">
1616
<activity
17-
android:name="com.whyranoid.signin.SignInActivity"
18-
android:theme="@style/Theme.MoGakRun.Splash"
17+
android:name="com.whyranoid.presentation.MainActivity"
18+
android:theme="@style/Theme.MoGakRun"
1919
android:exported="true">
2020
<intent-filter>
2121
<action android:name="android.intent.action.MAIN" />

โ€Žbuild.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ buildscript {
2323
splashVersion = "1.0.0"
2424
dataStoreVersion = "1.0.0"
2525
viewPager2Version = "1.0.0"
26+
desugarVersion = "2.0.0"
27+
calendarVersion = "1.0.4"
2628
}
2729
dependencies {
2830
classpath "com.google.gms:google-services:$googleServiceVersion"

โ€Žpresentation/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ android {
2424
}
2525
}
2626
compileOptions {
27+
coreLibraryDesugaringEnabled true
2728
sourceCompatibility JavaVersion.VERSION_11
2829
targetCompatibility JavaVersion.VERSION_11
2930
}
@@ -73,4 +74,7 @@ dependencies {
7374

7475
// ViewPager2
7576
implementation "androidx.viewpager2:viewpager2:$viewPager2Version"
77+
78+
// Calendar Library
79+
implementation "com.github.kizitonwose:CalendarView:$calendarVersion"
7680
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#000000"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#000000"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:autoMirrored="true" android:height="24dp"
2+
android:tint="#000000" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
5+
</vector>
Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools">
45

56
<data>
67

@@ -10,9 +11,99 @@
1011
android:layout_width="match_parent"
1112
android:layout_height="match_parent">
1213

13-
<include layout="@layout/bottom_navigation_bar" />
14+
<com.google.android.material.appbar.AppBarLayout
15+
android:id="@+id/tool_bar"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"
18+
app:layout_constraintTop_toTopOf="parent">
1419

15-
<include layout="@layout/tool_bar" />
20+
<com.google.android.material.appbar.MaterialToolbar
21+
android:id="@+id/top_app_bar"
22+
style="@style/Widget.MaterialComponents.Toolbar.Primary"
23+
android:layout_width="match_parent"
24+
android:layout_height="?attr/actionBarSize"
25+
app:menu="@menu/my_run_setting_menu"
26+
app:title="@string/bottom_navigation_menu_my_run"
27+
app:titleCentered="true" />
28+
29+
</com.google.android.material.appbar.AppBarLayout>
30+
31+
32+
<androidx.core.widget.NestedScrollView
33+
android:layout_width="match_parent"
34+
android:layout_height="0dp"
35+
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
36+
app:layout_constraintTop_toBottomOf="@id/tool_bar">
37+
38+
<androidx.constraintlayout.widget.ConstraintLayout
39+
android:layout_width="match_parent"
40+
android:layout_height="match_parent">
41+
42+
<ImageView
43+
android:id="@+id/iv_profile_image"
44+
android:layout_width="56dp"
45+
android:layout_height="56dp"
46+
android:layout_marginStart="16dp"
47+
android:layout_marginTop="20dp"
48+
android:contentDescription="@string/my_run_profile_image_description"
49+
android:src="@drawable/thumbnail_src_small"
50+
app:layout_constraintStart_toStartOf="parent"
51+
app:layout_constraintTop_toTopOf="parent" />
52+
53+
<TextView
54+
android:id="@+id/tv_nick_name"
55+
android:layout_width="wrap_content"
56+
android:layout_height="wrap_content"
57+
android:layout_marginStart="20dp"
58+
android:textAppearance="@style/MoGakRunText.Bold.Medium"
59+
app:layout_constraintBottom_toBottomOf="@id/iv_profile_image"
60+
app:layout_constraintStart_toEndOf="@id/iv_profile_image"
61+
app:layout_constraintTop_toTopOf="@id/iv_profile_image"
62+
tools:text="๋ณ‘ํฌํฌ" />
63+
64+
<ImageView
65+
android:layout_width="wrap_content"
66+
android:layout_height="wrap_content"
67+
android:layout_marginStart="20dp"
68+
android:layout_marginEnd="16dp"
69+
android:padding="8dp"
70+
android:contentDescription="@string/my_run_edit_nick_name_button_description"
71+
android:src="@drawable/my_run_edit_nick_name"
72+
app:layout_constraintBottom_toBottomOf="@id/tv_nick_name"
73+
app:layout_constraintEnd_toEndOf="parent"
74+
app:layout_constraintTop_toTopOf="@id/tv_nick_name" />
75+
76+
<com.kizitonwose.calendarview.CalendarView
77+
android:id="@+id/calendar_view"
78+
android:layout_width="0dp"
79+
android:layout_height="wrap_content"
80+
android:layout_marginHorizontal="16dp"
81+
android:layout_marginTop="20dp"
82+
app:cv_dayViewResource="@layout/item_calendar_day"
83+
app:cv_hasBoundaries="false"
84+
app:cv_scrollMode="paged"
85+
app:layout_constraintEnd_toEndOf="parent"
86+
app:layout_constraintStart_toStartOf="parent"
87+
app:layout_constraintTop_toBottomOf="@id/iv_profile_image" />
88+
89+
<androidx.recyclerview.widget.RecyclerView
90+
android:id="@+id/rv_my_running_history"
91+
android:layout_width="0dp"
92+
android:layout_height="wrap_content"
93+
android:layout_marginHorizontal="16dp"
94+
android:layout_marginTop="20dp"
95+
app:layout_constraintBottom_toBottomOf="parent"
96+
app:layout_constraintEnd_toEndOf="parent"
97+
app:layout_constraintStart_toStartOf="parent"
98+
app:layout_constraintTop_toBottomOf="@id/calendar_view" />
99+
100+
</androidx.constraintlayout.widget.ConstraintLayout>
101+
102+
</androidx.core.widget.NestedScrollView>
103+
104+
<include
105+
android:id="@+id/bottom_navigation"
106+
layout="@layout/bottom_navigation_bar" />
16107

17108
</androidx.constraintlayout.widget.ConstraintLayout>
18109
</layout>

โ€Žpresentation/src/main/res/layout/fragment_setting.xml

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<layout xmlns:android="http://schemas.android.com/apk/res/android">
2+
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools">
35

46
<data>
57

@@ -9,5 +11,109 @@
911
android:layout_width="match_parent"
1012
android:layout_height="match_parent">
1113

14+
<com.google.android.material.appbar.AppBarLayout
15+
android:id="@+id/tool_bar"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"
18+
app:layout_constraintTop_toTopOf="parent">
19+
20+
<com.google.android.material.appbar.MaterialToolbar
21+
android:id="@+id/top_app_bar"
22+
style="@style/Widget.MaterialComponents.Toolbar.Primary"
23+
android:layout_width="match_parent"
24+
android:layout_height="?attr/actionBarSize"
25+
app:titleCentered="true"
26+
app:title="@string/my_run_tool_bar_menu_setting"
27+
app:navigationIcon="@drawable/navigation_back_button"
28+
/>
29+
30+
</com.google.android.material.appbar.AppBarLayout>
31+
32+
<TextView
33+
android:id="@+id/tv_label_connected_account"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:text="@string/setting_connected_account"
37+
app:layout_constraintTop_toBottomOf="@id/tool_bar"
38+
app:layout_constraintStart_toStartOf="parent"
39+
android:layout_marginTop="16dp"
40+
android:layout_marginStart="16dp"/>
41+
42+
<TextView
43+
android:layout_width="wrap_content"
44+
android:layout_height="wrap_content"
45+
tools:text="[email protected]"
46+
app:layout_constraintTop_toTopOf="@id/tv_label_connected_account"
47+
app:layout_constraintBottom_toBottomOf="@id/tv_label_connected_account"
48+
app:layout_constraintStart_toEndOf="@id/tv_label_connected_account"
49+
android:layout_marginStart="12dp"/>
50+
51+
<TextView
52+
android:id="@+id/tv_whyranoider"
53+
android:layout_width="0dp"
54+
android:layout_height="wrap_content"
55+
app:layout_constraintTop_toBottomOf="@id/tv_label_connected_account"
56+
app:layout_constraintStart_toStartOf="parent"
57+
app:layout_constraintEnd_toEndOf="parent"
58+
android:layout_marginTop="20dp"
59+
android:paddingVertical="20dp"
60+
android:gravity="center"
61+
android:text="@string/setting_whyranoider"/>
62+
63+
<TextView
64+
android:id="@+id/tv_service_center"
65+
android:layout_width="0dp"
66+
android:layout_height="wrap_content"
67+
app:layout_constraintTop_toBottomOf="@id/tv_whyranoider"
68+
app:layout_constraintStart_toStartOf="parent"
69+
app:layout_constraintEnd_toEndOf="parent"
70+
android:paddingVertical="20dp"
71+
android:gravity="center"
72+
android:text="@string/setting_service_center"/>
73+
74+
<TextView
75+
android:id="@+id/tv_privacy_policy"
76+
android:layout_width="0dp"
77+
android:layout_height="wrap_content"
78+
app:layout_constraintTop_toBottomOf="@id/tv_service_center"
79+
app:layout_constraintStart_toStartOf="parent"
80+
app:layout_constraintEnd_toEndOf="parent"
81+
android:paddingVertical="20dp"
82+
android:gravity="center"
83+
android:text="@string/setting_privacy_policy"/>
84+
85+
<TextView
86+
android:id="@+id/tv_service_policy"
87+
android:layout_width="0dp"
88+
android:layout_height="wrap_content"
89+
app:layout_constraintTop_toBottomOf="@id/tv_privacy_policy"
90+
app:layout_constraintStart_toStartOf="parent"
91+
app:layout_constraintEnd_toEndOf="parent"
92+
android:paddingVertical="20dp"
93+
android:gravity="center"
94+
android:text="@string/setting_service_policy"/>
95+
96+
<TextView
97+
android:id="@+id/tv_open_source_license"
98+
android:layout_width="0dp"
99+
android:layout_height="wrap_content"
100+
app:layout_constraintTop_toBottomOf="@id/tv_service_policy"
101+
app:layout_constraintStart_toStartOf="parent"
102+
app:layout_constraintEnd_toEndOf="parent"
103+
android:paddingVertical="20dp"
104+
android:gravity="center"
105+
android:text="@string/setting_open_source_license"/>
106+
107+
<TextView
108+
android:id="@+id/tv_log_out"
109+
android:layout_width="0dp"
110+
android:layout_height="wrap_content"
111+
app:layout_constraintTop_toBottomOf="@id/tv_open_source_license"
112+
app:layout_constraintStart_toStartOf="parent"
113+
app:layout_constraintEnd_toEndOf="parent"
114+
android:paddingVertical="20dp"
115+
android:gravity="center"
116+
android:text="@string/setting_log_out"/>
117+
12118
</androidx.constraintlayout.widget.ConstraintLayout>
13119
</layout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
xmlns:app="http://schemas.android.com/apk/res-auto">
7+
8+
<TextView
9+
android:id="@+id/tv_calendar_day"
10+
android:layout_width="0dp"
11+
android:layout_height="0dp"
12+
app:layout_constraintTop_toTopOf="parent"
13+
app:layout_constraintStart_toStartOf="parent"
14+
app:layout_constraintEnd_toEndOf="parent"
15+
app:layout_constraintBottom_toBottomOf="parent"
16+
android:gravity="center"
17+
tools:text="22"/>
18+
19+
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto">
4+
<item
5+
android:id="@+id/my_run_setting"
6+
android:enabled="true"
7+
app:showAsAction="always"
8+
android:icon="@drawable/my_run_tool_bar_setting"
9+
android:title="@string/my_run_tool_bar_menu_setting"/>
10+
</menu>

0 commit comments

Comments
ย (0)