Skip to content

Commit e6a1037

Browse files
committed
Update app theme and improve UI consistency with new color scheme and layout adjustments
1 parent 296453d commit e6a1037

File tree

10 files changed

+482
-254
lines changed

10 files changed

+482
-254
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
android:label="@string/app_name"
1717
android:roundIcon="@mipmap/ic_launcher_round"
1818
android:supportsRtl="true"
19-
android:theme="@style/Theme.BirthdayReminder"
19+
android:theme="@style/AppTheme"
2020
tools:targetApi="31">
2121
<activity
2222
android:name=".ui.MainActivity"

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

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.core.widget.NestedScrollView 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"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:background="?android:colorBackground">
7+
android:background="?android:colorBackground"
8+
android:fillViewport="true"
9+
tools:context=".ui.add.AddFragment">
810

911
<LinearLayout
1012
android:layout_width="match_parent"
@@ -16,9 +18,9 @@
1618
android:layout_width="match_parent"
1719
android:layout_height="?attr/actionBarSize"
1820
android:background="?attr/colorSurface"
19-
app:navigationIcon="?homeAsUpIndicator"
21+
app:navigationIcon="?attr/homeAsUpIndicator"
2022
app:navigationIconTint="?attr/colorOnSurface"
21-
app:title="Kişi Ekle"
23+
app:title="@string/add_person_title"
2224
app:titleTextColor="?attr/colorOnSurface" />
2325

2426
<LinearLayout
@@ -33,13 +35,13 @@
3335
android:layout_width="120dp"
3436
android:layout_height="120dp"
3537
android:layout_marginBottom="24dp"
36-
android:background="?attr/selectableItemBackgroundBorderless"
3738
android:clickable="true"
38-
android:contentDescription="Profil Fotoğrafı"
3939
android:focusable="true"
4040
android:padding="4dp"
4141
android:scaleType="centerCrop"
4242
android:src="@drawable/avatar"
43+
android:contentDescription="@string/profile_image_desc"
44+
app:backgroundTint="?attr/colorSurfaceVariant"
4345
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
4446
app:strokeColor="?attr/colorOutline"
4547
app:strokeWidth="2dp" />
@@ -49,7 +51,7 @@
4951
android:layout_width="match_parent"
5052
android:layout_height="wrap_content"
5153
android:layout_marginBottom="16dp"
52-
android:hint="İsim">
54+
android:hint="@string/name_hint">
5355

5456
<com.google.android.material.textfield.TextInputEditText
5557
android:id="@+id/nameInput"
@@ -65,7 +67,7 @@
6567
android:layout_width="match_parent"
6668
android:layout_height="wrap_content"
6769
android:layout_marginBottom="16dp"
68-
android:hint="Doğum Tarihi"
70+
android:hint="@string/birth_date_hint"
6971
app:startIconDrawable="@drawable/calendar_24"
7072
app:startIconTint="?attr/colorOnSurfaceVariant">
7173

@@ -75,6 +77,8 @@
7577
android:layout_height="wrap_content"
7678
android:focusable="false"
7779
android:inputType="none"
80+
android:textColor="?attr/colorOnSurface"
81+
android:textColorHint="?attr/colorOnSurfaceVariant"
7882
tools:text="07.05.1998" />
7983
</com.google.android.material.textfield.TextInputLayout>
8084

@@ -83,7 +87,7 @@
8387
android:layout_width="match_parent"
8488
android:layout_height="wrap_content"
8589
android:layout_marginBottom="16dp"
86-
android:hint="Telefon Numarası"
90+
android:hint="@string/phone_hint"
8791
app:startIconDrawable="@drawable/phone_24"
8892
app:startIconTint="?attr/colorOnSurfaceVariant">
8993

@@ -101,7 +105,7 @@
101105
android:layout_width="match_parent"
102106
android:layout_height="wrap_content"
103107
android:layout_marginBottom="24dp"
104-
android:hint="Not">
108+
android:hint="@string/note_hint">
105109

106110
<com.google.android.material.textfield.TextInputEditText
107111
android:id="@+id/noteInput"
@@ -118,10 +122,13 @@
118122
android:id="@+id/saveButton"
119123
android:layout_width="match_parent"
120124
android:layout_height="wrap_content"
121-
android:paddingVertical="12dp"
122-
android:text="Kaydet"
123-
android:textSize="18sp"
124-
app:cornerRadius="8dp" />
125+
android:text="@string/save_button"
126+
android:textSize="16sp"
127+
app:cornerRadius="16dp"
128+
app:backgroundTint="?attr/colorPrimary"
129+
app:iconTint="?attr/colorOnPrimary"
130+
app:rippleColor="?attr/colorPrimaryContainer"
131+
android:textColor="?attr/colorOnPrimary" />
125132
</LinearLayout>
126133
</LinearLayout>
127-
</ScrollView>
134+
</androidx.core.widget.NestedScrollView>

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

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.core.widget.NestedScrollView 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"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:background="?android:colorBackground">
7+
android:background="?android:colorBackground"
8+
android:fillViewport="true"
9+
tools:context=".ui.edit.EditFragment">
810

911
<LinearLayout
1012
android:layout_width="match_parent"
@@ -16,9 +18,9 @@
1618
android:layout_width="match_parent"
1719
android:layout_height="?attr/actionBarSize"
1820
android:background="?attr/colorSurface"
19-
app:navigationIcon="?homeAsUpIndicator"
21+
app:navigationIcon="?attr/homeAsUpIndicator"
2022
app:navigationIconTint="?attr/colorOnSurface"
21-
app:title="Kişiyi Düzenle"
23+
app:title="@string/edit_person_title"
2224
app:titleTextColor="?attr/colorOnSurface" />
2325

2426
<LinearLayout
@@ -33,7 +35,7 @@
3335
android:layout_width="120dp"
3436
android:layout_height="120dp"
3537
android:layout_marginBottom="24dp"
36-
android:background="?attr/selectableItemBackgroundBorderless"
38+
android:contentDescription="@string/profile_image_desc"
3739
android:clickable="true"
3840
android:focusable="true"
3941
android:padding="4dp"
@@ -50,7 +52,7 @@
5052
android:layout_width="match_parent"
5153
android:layout_height="wrap_content"
5254
android:layout_marginBottom="16dp"
53-
android:hint="İsim">
55+
android:hint="@string/name_hint">
5456

5557
<com.google.android.material.textfield.TextInputEditText
5658
android:id="@+id/nameInput"
@@ -66,7 +68,7 @@
6668
android:layout_width="match_parent"
6769
android:layout_height="wrap_content"
6870
android:layout_marginBottom="16dp"
69-
android:hint="Doğum Tarihi"
71+
android:hint="@string/birth_date_hint"
7072
app:startIconDrawable="@drawable/calendar_24"
7173
app:startIconTint="?attr/colorOnSurfaceVariant">
7274

@@ -86,7 +88,7 @@
8688
android:layout_width="match_parent"
8789
android:layout_height="wrap_content"
8890
android:layout_marginBottom="16dp"
89-
android:hint="Telefon Numarası"
91+
android:hint="@string/phone_hint"
9092
app:startIconDrawable="@drawable/phone_24"
9193
app:startIconTint="?attr/colorOnSurfaceVariant">
9294

@@ -104,7 +106,7 @@
104106
android:layout_width="match_parent"
105107
android:layout_height="wrap_content"
106108
android:layout_marginBottom="24dp"
107-
android:hint="Not">
109+
android:hint="@string/note_hint">
108110

109111
<com.google.android.material.textfield.TextInputEditText
110112
android:id="@+id/noteInput"
@@ -121,10 +123,13 @@
121123
android:id="@+id/saveButton"
122124
android:layout_width="match_parent"
123125
android:layout_height="wrap_content"
124-
android:paddingVertical="12dp"
125-
android:text="Kaydet"
126-
android:textSize="18sp"
127-
app:cornerRadius="8dp" />
126+
android:text="@string/save_button"
127+
android:textSize="16sp"
128+
app:cornerRadius="16dp"
129+
app:backgroundTint="?attr/colorPrimary"
130+
app:iconTint="?attr/colorOnPrimary"
131+
app:rippleColor="?attr/colorPrimaryContainer"
132+
android:textColor="?attr/colorOnPrimary" />
128133
</LinearLayout>
129134
</LinearLayout>
130-
</ScrollView>
135+
</androidx.core.widget.NestedScrollView>

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

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,73 +13,69 @@
1313
android:layout_width="match_parent"
1414
android:layout_height="wrap_content"
1515
android:background="?attr/colorSurface"
16+
android:elevation="4dp"
1617
android:minHeight="?attr/actionBarSize"
17-
app:layout_constraintEnd_toEndOf="parent"
18-
app:layout_constraintStart_toStartOf="parent"
18+
app:title="@string/home_title"
19+
app:titleTextColor="?attr/colorOnSurface"
1920
app:layout_constraintTop_toTopOf="parent"
20-
app:title="Doğum Günleri"
21-
app:titleTextColor="?attr/colorOnSurface" />
21+
app:layout_constraintStart_toStartOf="parent"
22+
app:layout_constraintEnd_toEndOf="parent" />
2223

2324
<androidx.constraintlayout.widget.ConstraintLayout
2425
android:id="@+id/emptySection"
2526
android:layout_width="match_parent"
2627
android:layout_height="0dp"
2728
android:visibility="gone"
28-
app:layout_constraintBottom_toBottomOf="parent"
29-
app:layout_constraintTop_toBottomOf="@id/materialToolbar">
29+
app:layout_constraintTop_toBottomOf="@id/materialToolbar"
30+
app:layout_constraintBottom_toBottomOf="parent">
3031

3132
<ImageView
3233
android:id="@+id/emptyIcon"
33-
android:layout_width="96dp"
34-
android:layout_height="96dp"
35-
android:alpha="0.5"
36-
android:contentDescription="Empty State Icon"
34+
android:layout_width="72dp"
35+
android:layout_height="72dp"
36+
android:alpha="1"
37+
android:contentDescription="@string/empty_icon_desc"
3738
android:src="@drawable/person_24"
39+
app:tint="?attr/colorOnSurfaceVariant"
40+
app:layout_constraintTop_toTopOf="parent"
3841
app:layout_constraintBottom_toBottomOf="parent"
39-
app:layout_constraintEnd_toEndOf="parent"
4042
app:layout_constraintStart_toStartOf="parent"
41-
app:layout_constraintTop_toTopOf="parent"
42-
app:layout_constraintVertical_bias="0.40"
43-
app:tint="?attr/colorOnBackground" />
43+
app:layout_constraintEnd_toEndOf="parent"
44+
app:layout_constraintVertical_bias="0.4" />
4445

4546
<TextView
4647
android:id="@+id/emptyText"
4748
android:layout_width="wrap_content"
4849
android:layout_height="wrap_content"
4950
android:layout_marginTop="6dp"
50-
android:alpha="0.5"
51-
android:text="Henüz kimse eklenmedi"
52-
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
53-
android:textColor="?attr/colorOnBackground"
54-
android:textStyle="bold"
55-
app:layout_constraintEnd_toEndOf="@+id/emptyIcon"
56-
app:layout_constraintStart_toStartOf="@+id/emptyIcon"
57-
app:layout_constraintTop_toBottomOf="@id/emptyIcon" />
51+
android:text="@string/empty_state_message"
52+
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
53+
android:textColor="?attr/colorOnSurfaceVariant"
54+
app:layout_constraintTop_toBottomOf="@id/emptyIcon"
55+
app:layout_constraintStart_toStartOf="@id/emptyIcon"
56+
app:layout_constraintEnd_toEndOf="@id/emptyIcon" />
5857
</androidx.constraintlayout.widget.ConstraintLayout>
5958

60-
6159
<androidx.constraintlayout.widget.ConstraintLayout
6260
android:id="@+id/todaySection"
6361
android:layout_width="match_parent"
6462
android:layout_height="wrap_content"
65-
android:padding="12dp"
63+
android:padding="16dp"
6664
android:visibility="gone"
67-
app:layout_constraintEnd_toEndOf="parent"
65+
app:layout_constraintTop_toBottomOf="@id/materialToolbar"
6866
app:layout_constraintStart_toStartOf="parent"
69-
app:layout_constraintTop_toBottomOf="@+id/materialToolbar">
67+
app:layout_constraintEnd_toEndOf="parent">
7068

7169
<TextView
7270
android:id="@+id/todayBirthdayTitle"
7371
android:layout_width="match_parent"
7472
android:layout_height="wrap_content"
75-
android:text="Bugün Doğum Günü Olanlar 🎉"
73+
android:text="@string/today_birthdays_title"
74+
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
7675
android:textColor="?attr/colorOnBackground"
77-
android:textSize="18sp"
78-
android:textStyle="bold"
79-
android:visibility="visible"
80-
app:layout_constraintEnd_toEndOf="parent"
76+
app:layout_constraintTop_toTopOf="parent"
8177
app:layout_constraintStart_toStartOf="parent"
82-
app:layout_constraintTop_toTopOf="parent" />
78+
app:layout_constraintEnd_toEndOf="parent" />
8379

8480
<androidx.recyclerview.widget.RecyclerView
8581
android:id="@+id/todayRecyclerView"
@@ -89,35 +85,32 @@
8985
android:layout_marginBottom="16dp"
9086
android:visibility="visible"
9187
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
92-
app:layout_constraintEnd_toEndOf="parent"
88+
app:layout_constraintTop_toBottomOf="@id/todayBirthdayTitle"
9389
app:layout_constraintStart_toStartOf="parent"
94-
app:layout_constraintTop_toBottomOf="@id/todayBirthdayTitle" />
90+
app:layout_constraintEnd_toEndOf="parent" />
9591
</androidx.constraintlayout.widget.ConstraintLayout>
9692

97-
9893
<androidx.constraintlayout.widget.ConstraintLayout
9994
android:id="@+id/allSection"
10095
android:layout_width="match_parent"
10196
android:layout_height="0dp"
102-
android:padding="12dp"
97+
android:padding="16dp"
10398
android:visibility="gone"
99+
app:layout_constraintTop_toBottomOf="@id/todaySection"
104100
app:layout_constraintBottom_toBottomOf="parent"
105-
app:layout_constraintEnd_toEndOf="parent"
106101
app:layout_constraintStart_toStartOf="parent"
107-
app:layout_constraintTop_toBottomOf="@+id/todaySection">
102+
app:layout_constraintEnd_toEndOf="parent">
108103

109104
<TextView
110105
android:id="@+id/allTitle"
111-
android:layout_width="0dp"
106+
android:layout_width="match_parent"
112107
android:layout_height="wrap_content"
113-
android:text="Tüm Kişiler"
108+
android:text="@string/all_people_title"
109+
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
114110
android:textColor="?attr/colorOnBackground"
115-
android:textSize="18sp"
116-
android:textStyle="bold"
117-
android:visibility="visible"
118-
app:layout_constraintEnd_toEndOf="parent"
111+
app:layout_constraintTop_toTopOf="parent"
119112
app:layout_constraintStart_toStartOf="parent"
120-
app:layout_constraintTop_toTopOf="parent" />
113+
app:layout_constraintEnd_toEndOf="parent" />
121114

122115
<androidx.recyclerview.widget.RecyclerView
123116
android:id="@+id/allRecyclerView"
@@ -126,25 +119,24 @@
126119
android:layout_marginTop="8dp"
127120
android:visibility="visible"
128121
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
122+
app:layout_constraintTop_toBottomOf="@id/allTitle"
129123
app:layout_constraintBottom_toBottomOf="parent"
130-
app:layout_constraintEnd_toEndOf="parent"
131124
app:layout_constraintStart_toStartOf="parent"
132-
app:layout_constraintTop_toBottomOf="@id/allTitle" />
125+
app:layout_constraintEnd_toEndOf="parent" />
133126
</androidx.constraintlayout.widget.ConstraintLayout>
134127

135128
<com.google.android.material.floatingactionbutton.FloatingActionButton
136129
android:id="@+id/fab"
137130
android:layout_width="wrap_content"
138131
android:layout_height="wrap_content"
139132
android:layout_margin="16dp"
133+
android:contentDescription="@string/add_person"
140134
android:backgroundTint="?attr/colorPrimaryContainer"
141-
android:clickable="true"
142-
android:contentDescription="Add Person"
143-
android:focusable="true"
144-
app:elevation="6dp"
145135
app:srcCompat="@android:drawable/ic_menu_add"
146-
app:layout_constraintBottom_toBottomOf="parent"
147-
app:layout_constraintEnd_toEndOf="parent"
136+
app:elevation="3dp"
137+
app:tint="?attr/colorOnPrimaryContainer"
138+
app:rippleColor="?attr/colorPrimary"
148139
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
149-
app:tint="?attr/colorOnPrimaryContainer" />
150-
</androidx.constraintlayout.widget.ConstraintLayout>
140+
app:layout_constraintBottom_toBottomOf="parent"
141+
app:layout_constraintEnd_toEndOf="parent" />
142+
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)