Skip to content

Commit e8c94fb

Browse files
author
Wen Chia Yang
committed
(refactor) setting list ui
1 parent e084936 commit e8c94fb

File tree

3 files changed

+41
-17
lines changed

3 files changed

+41
-17
lines changed
Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout 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"
5-
android:layout_width="match_parent"
6-
android:layout_height="match_parent"
7-
android:background="@color/default_background_color"
8-
tools:context=".scenes.main.fragments.setting.SettingFragment">
2+
<androidx.constraintlayout.widget.ConstraintLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:background="@color/default_background_color"
9+
tools:context=".scenes.main.fragments.setting.SettingFragment">
910

10-
<androidx.recyclerview.widget.RecyclerView
11-
android:id="@+id/recycler_view_setting_fragment"
11+
<LinearLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14-
android:scrollbars="vertical"
15-
tools:listitem="@layout/item_image_text"/>
14+
android:orientation="vertical">
15+
16+
<TextView
17+
style="@style/TitleStyleCollectionsNotes"
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"
20+
android:layout_marginTop="10dp"
21+
android:padding="10dp"
22+
android:text="@string/setting_header"
23+
android:textAppearance="@style/TextAppearance.AppCompat.Large"/>
24+
25+
<androidx.recyclerview.widget.RecyclerView
26+
android:id="@+id/recycler_view_setting_fragment"
27+
android:layout_width="match_parent"
28+
android:layout_height="match_parent"
29+
android:scrollbars="vertical"
30+
tools:listitem="@layout/item_image_text"/>
31+
32+
</LinearLayout>
1633

1734
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.cardview.widget.CardView
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
35
android:layout_width="match_parent"
46
android:layout_height="wrap_content"
57
android:layout_marginStart="8dp"
68
android:layout_marginTop="8dp"
7-
android:layout_marginEnd="8dp">
9+
android:layout_marginEnd="8dp"
10+
app:cardCornerRadius="10dp">
811

912
<TextView
1013
android:id="@+id/text_view_image_text"
1114
android:layout_width="match_parent"
1215
android:layout_height="wrap_content"
13-
android:drawablePadding="20dp"
16+
android:drawableStart="@drawable/ic_default"
17+
android:drawablePadding="16dp"
1418
android:layout_marginTop="8dp"
1519
android:layout_marginBottom="8dp"
1620
android:layout_marginStart="8dp"
17-
android:text="sample text"
18-
android:textAppearance="@style/TextAppearance.AppCompat.Large"/>
21+
android:layout_marginEnd="24dp"
22+
android:gravity="center|start"
23+
android:text="Sample Text"
24+
style="@style/BlackContentStyle"
25+
android:textSize="24sp" />
1926

2027
</androidx.cardview.widget.CardView>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<string name="new_category">new category</string>
3030

3131
<!-- Setting Fragment -->
32-
32+
<string name="setting_header">Setting</string>
3333

3434
<!-- Note Activity -->
3535
<string name="note_search_hint">Find your notes</string>

0 commit comments

Comments
 (0)