Skip to content

Commit fd12eba

Browse files
committed
feat: The options have been rearranged in order of frequency of use from most to least in ProjectOptionsBottomSheet.
feat: The options have been grouped in ProjectOptionsBottomSheet.
1 parent 7706ab5 commit fd12eba

2 files changed

Lines changed: 41 additions & 31 deletions

File tree

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+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:color="?attr/colorControlHighlight">
4+
<item>
5+
<shape android:shape="rectangle">
6+
<solid android:color="?attr/colorErrorContainer" />
7+
<corners android:radius="18dp" />
8+
</shape>
9+
</item>
10+
</ripple>

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

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="wrap_content"
6-
android:orientation="vertical"
7-
android:paddingBottom="16dp">
6+
android:orientation="vertical">
87

98
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
109
android:layout_width="match_parent"
@@ -37,13 +36,15 @@
3736
<LinearLayout
3837
android:layout_width="match_parent"
3938
android:layout_height="wrap_content"
40-
android:orientation="vertical">
39+
android:orientation="vertical"
40+
android:paddingHorizontal="16dp"
41+
android:paddingBottom="16dp">
4142

4243
<LinearLayout
43-
android:id="@+id/project_settings"
44+
android:id="@+id/pin_project"
4445
android:layout_width="match_parent"
4546
android:layout_height="wrap_content"
46-
android:background="?attr/selectableItemBackground"
47+
android:background="@drawable/project_item_shape_alone"
4748
android:clickable="true"
4849
android:focusable="true"
4950
android:gravity="center_vertical"
@@ -52,16 +53,18 @@
5253
android:paddingVertical="16dp">
5354

5455
<ImageView
56+
android:id="@+id/pin_icon"
5557
android:layout_width="24dp"
5658
android:layout_height="24dp"
57-
app:srcCompat="@drawable/ic_mtrl_tune" />
59+
app:srcCompat="@drawable/ic_mtrl_pin" />
5860

5961
<TextView
62+
android:id="@+id/pin_text"
6063
android:layout_width="match_parent"
6164
android:layout_height="wrap_content"
6265
android:layout_marginStart="16dp"
6366
android:gravity="center_vertical"
64-
android:text="Change project settings"
67+
android:text="Pin project"
6568
android:textAppearance="?attr/textAppearanceBodyLarge"
6669
app:drawableEndCompat="@drawable/ic_mtrl_arrow_right" />
6770

@@ -71,13 +74,13 @@
7174
android:id="@+id/project_backup"
7275
android:layout_width="match_parent"
7376
android:layout_height="wrap_content"
74-
android:background="?attr/selectableItemBackground"
77+
android:background="@drawable/project_item_shape_top"
7578
android:clickable="true"
7679
android:focusable="true"
7780
android:gravity="center_vertical"
7881
android:orientation="horizontal"
79-
android:paddingHorizontal="16dp"
80-
android:paddingVertical="16dp">
82+
android:padding="16dp"
83+
android:layout_marginTop="16dp">
8184

8285
<ImageView
8386
android:layout_width="24dp"
@@ -100,13 +103,13 @@
100103
android:id="@+id/export_sign"
101104
android:layout_width="match_parent"
102105
android:layout_height="wrap_content"
103-
android:background="?attr/selectableItemBackground"
106+
android:background="@drawable/project_item_shape_bottom"
104107
android:clickable="true"
105108
android:focusable="true"
106109
android:gravity="center_vertical"
107110
android:orientation="horizontal"
108-
android:paddingHorizontal="16dp"
109-
android:paddingVertical="16dp">
111+
android:padding="16dp"
112+
android:layout_marginTop="2dp">
110113

111114
<ImageView
112115
android:layout_width="24dp"
@@ -125,75 +128,72 @@
125128
</LinearLayout>
126129

127130
<LinearLayout
128-
android:id="@+id/project_config"
131+
android:id="@+id/project_settings"
129132
android:layout_width="match_parent"
130133
android:layout_height="wrap_content"
131-
android:background="?attr/selectableItemBackground"
134+
android:background="@drawable/project_item_shape_top"
132135
android:clickable="true"
133136
android:focusable="true"
134137
android:gravity="center_vertical"
135138
android:orientation="horizontal"
136-
android:paddingHorizontal="16dp"
137-
android:paddingVertical="16dp">
139+
android:padding="16dp"
140+
android:layout_marginTop="16dp">
138141

139142
<ImageView
140143
android:layout_width="24dp"
141144
android:layout_height="24dp"
142-
app:srcCompat="@drawable/ic_mtrl_toggle" />
145+
app:srcCompat="@drawable/ic_mtrl_tune" />
143146

144147
<TextView
145148
android:layout_width="match_parent"
146149
android:layout_height="wrap_content"
147150
android:layout_marginStart="16dp"
148151
android:gravity="center_vertical"
149-
android:text="Project configuration"
152+
android:text="Change project settings"
150153
android:textAppearance="?attr/textAppearanceBodyLarge"
151154
app:drawableEndCompat="@drawable/ic_mtrl_arrow_right" />
152155

153156
</LinearLayout>
154157

155158
<LinearLayout
156-
android:id="@+id/pin_project"
159+
android:id="@+id/project_config"
157160
android:layout_width="match_parent"
158161
android:layout_height="wrap_content"
159-
android:background="?attr/selectableItemBackground"
162+
android:background="@drawable/project_item_shape_bottom"
160163
android:clickable="true"
161164
android:focusable="true"
162165
android:gravity="center_vertical"
163166
android:orientation="horizontal"
164-
android:paddingHorizontal="16dp"
165-
android:paddingVertical="16dp">
167+
android:padding="16dp"
168+
android:layout_marginTop="2dp">
166169

167170
<ImageView
168-
android:id="@+id/pin_icon"
169171
android:layout_width="24dp"
170172
android:layout_height="24dp"
171-
app:srcCompat="@drawable/ic_mtrl_pin" />
173+
app:srcCompat="@drawable/ic_mtrl_toggle" />
172174

173175
<TextView
174-
android:id="@+id/pin_text"
175176
android:layout_width="match_parent"
176177
android:layout_height="wrap_content"
177178
android:layout_marginStart="16dp"
178179
android:gravity="center_vertical"
179-
android:text="Pin project"
180+
android:text="Project configuration"
180181
android:textAppearance="?attr/textAppearanceBodyLarge"
181182
app:drawableEndCompat="@drawable/ic_mtrl_arrow_right" />
182183

183184
</LinearLayout>
184185

185-
186186
<LinearLayout
187187
android:id="@+id/project_delete"
188188
android:layout_width="match_parent"
189189
android:layout_height="wrap_content"
190-
android:background="?attr/selectableItemBackground"
190+
android:background="@drawable/project_item_shape_alone_error"
191191
android:clickable="true"
192192
android:focusable="true"
193193
android:gravity="center_vertical"
194194
android:orientation="horizontal"
195-
android:paddingHorizontal="16dp"
196-
android:paddingVertical="16dp">
195+
android:padding="16dp"
196+
android:layout_marginTop="16dp">
197197

198198
<ImageView
199199
android:layout_width="24dp"

0 commit comments

Comments
 (0)