Skip to content

Commit b7cbe00

Browse files
committed
Enhance App Detail UI with icons and better layout - Move Launch button to header (top right corner) - Add native icons to all action chips - Add new icons: ic_stop, ic_freeze, ic_battery_alert, ic_cleaning, ic_delete, ic_delete_sweep - Move App Info button to chips group - Compact header with smaller icon and text
1 parent 7b4a457 commit b7cbe00

File tree

7 files changed

+94
-29
lines changed

7 files changed

+94
-29
lines changed
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4zM13,18h-2v-2h2v2zM13,14h-2V9h2v5z"/>
10+
</vector>
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M16,11h-1V3c0,-1.1 -0.9,-2 -2,-2h-2c-1.1,0 -2,0.9 -2,2v8H8c-2.76,0 -5,2.24 -5,5v7h18v-7c0,-2.76 -2.24,-5 -5,-5zM11,3h2v8h-2V3zM17,21H7v-1c0,-0.55 0.45,-1 1,-1h8c0.55,0 1,0.45 1,1v1z"/>
10+
</vector>
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
10+
</vector>
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M15,16h4v2h-4zM15,8h7v2h-7zM15,12h6v2h-6zM3,18c0,1.1 0.9,2 2,2h6c1.1,0 2,-0.9 2,-2V8H3v10zM14,5h-3l-1,-1H6L5,5H2v2h12z"/>
10+
</vector>
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M22,11h-4.17l3.24,-3.24 -1.41,-1.42L15,11h-2V9l4.66,-4.66 -1.42,-1.41L13,6.17V2h-2v4.17L7.76,2.93 6.34,4.34 11,9v2H9L4.34,6.34 2.93,7.76 6.17,11H2v2h4.17l-3.24,3.24 1.41,1.42L9,13h2v2l-4.66,4.66 1.42,1.41L11,17.83V22h2v-4.17l3.24,3.24 1.42,-1.41L13,15v-2h2l4.66,4.66 1.41,-1.42L17.83,13H22z"/>
10+
</vector>
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+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@android:color/black"
9+
android:pathData="M6,6h12v12H6z"/>
10+
</vector>

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

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
<ImageView
1717
android:id="@+id/ivAppIcon"
18-
android:layout_width="64dp"
19-
android:layout_height="64dp"
18+
android:layout_width="56dp"
19+
android:layout_height="56dp"
2020
android:contentDescription="@string/app_icon_desc" />
2121

2222
<LinearLayout
@@ -30,25 +30,37 @@
3030
android:id="@+id/tvAppName"
3131
android:layout_width="wrap_content"
3232
android:layout_height="wrap_content"
33-
android:textSize="20sp"
33+
android:textSize="18sp"
3434
android:textStyle="bold"
35-
android:maxLines="2"
35+
android:maxLines="1"
3636
android:ellipsize="end" />
3737

3838
<TextView
3939
android:id="@+id/tvVersion"
4040
android:layout_width="wrap_content"
4141
android:layout_height="wrap_content"
4242
android:textColor="@color/on_surface_secondary"
43-
android:textSize="14sp" />
43+
android:textSize="13sp" />
4444

4545
<TextView
4646
android:id="@+id/tvAppType"
4747
android:layout_width="wrap_content"
4848
android:layout_height="wrap_content"
49-
android:textSize="12sp"
49+
android:textSize="11sp"
5050
android:textStyle="bold" />
5151
</LinearLayout>
52+
53+
<com.google.android.material.button.MaterialButton
54+
android:id="@+id/btnLaunchApp"
55+
android:layout_width="48dp"
56+
android:layout_height="48dp"
57+
android:insetTop="0dp"
58+
android:insetBottom="0dp"
59+
app:icon="@drawable/ic_launch"
60+
app:iconGravity="textStart"
61+
app:iconPadding="0dp"
62+
style="@style/Widget.Material3.Button.TonalButton"
63+
android:contentDescription="@string/action_launch" />
5264
</LinearLayout>
5365

5466
<!-- Package Name -->
@@ -283,29 +295,6 @@
283295
android:textStyle="bold"
284296
android:textSize="14sp" />
285297

286-
<!-- Primary Actions: Launch & Settings -->
287-
<LinearLayout
288-
android:layout_width="match_parent"
289-
android:layout_height="wrap_content"
290-
android:layout_marginTop="12dp"
291-
android:orientation="horizontal">
292-
<Button
293-
android:id="@+id/btnLaunchApp"
294-
android:layout_width="0dp"
295-
android:layout_height="wrap_content"
296-
android:layout_weight="1"
297-
android:text="@string/action_launch"
298-
style="@style/Widget.Material3.Button.TonalButton" />
299-
<Button
300-
android:id="@+id/btnOpenSettings"
301-
android:layout_width="0dp"
302-
android:layout_height="wrap_content"
303-
android:layout_weight="1"
304-
android:layout_marginStart="8dp"
305-
android:text="@string/btn_info"
306-
style="@style/Widget.Material3.Button.TonalButton" />
307-
</LinearLayout>
308-
309298
<!-- Control Actions -->
310299
<com.google.android.material.chip.ChipGroup
311300
android:layout_width="match_parent"
@@ -318,6 +307,7 @@
318307
android:layout_width="wrap_content"
319308
android:layout_height="wrap_content"
320309
android:text="@string/action_force_stop"
310+
app:chipIcon="@drawable/ic_stop"
321311
app:chipBackgroundColor="@color/surface_container"
322312
app:chipStrokeWidth="1dp"
323313
app:chipStrokeColor="@color/outline" />
@@ -327,6 +317,7 @@
327317
android:layout_width="wrap_content"
328318
android:layout_height="wrap_content"
329319
android:text="@string/action_freeze"
320+
app:chipIcon="@drawable/ic_freeze"
330321
app:chipBackgroundColor="@color/surface_container"
331322
app:chipStrokeWidth="1dp"
332323
app:chipStrokeColor="@color/outline" />
@@ -336,6 +327,7 @@
336327
android:layout_width="wrap_content"
337328
android:layout_height="wrap_content"
338329
android:text="@string/action_restrict_bg"
330+
app:chipIcon="@drawable/ic_battery_alert"
339331
app:chipBackgroundColor="@color/surface_container"
340332
app:chipStrokeWidth="1dp"
341333
app:chipStrokeColor="@color/outline" />
@@ -345,6 +337,7 @@
345337
android:layout_width="wrap_content"
346338
android:layout_height="wrap_content"
347339
android:text="@string/action_clear_cache"
340+
app:chipIcon="@drawable/ic_cleaning"
348341
app:chipBackgroundColor="@color/surface_container"
349342
app:chipStrokeWidth="1dp"
350343
app:chipStrokeColor="@color/outline" />
@@ -354,6 +347,7 @@
354347
android:layout_width="wrap_content"
355348
android:layout_height="wrap_content"
356349
android:text="@string/action_clear_data"
350+
app:chipIcon="@drawable/ic_delete_sweep"
357351
app:chipBackgroundColor="@color/surface_container"
358352
app:chipStrokeWidth="1dp"
359353
app:chipStrokeColor="@color/outline" />
@@ -363,9 +357,20 @@
363357
android:layout_width="wrap_content"
364358
android:layout_height="wrap_content"
365359
android:text="@string/action_uninstall"
360+
app:chipIcon="@drawable/ic_delete"
366361
app:chipBackgroundColor="@color/surface_container"
367362
app:chipStrokeWidth="1dp"
368363
app:chipStrokeColor="@color/status_negative" />
369364

365+
<com.google.android.material.chip.Chip
366+
android:id="@+id/btnOpenSettings"
367+
android:layout_width="wrap_content"
368+
android:layout_height="wrap_content"
369+
android:text="@string/btn_info"
370+
app:chipIcon="@drawable/ic_info"
371+
app:chipBackgroundColor="@color/surface_container"
372+
app:chipStrokeWidth="1dp"
373+
app:chipStrokeColor="@color/outline" />
374+
370375
</com.google.android.material.chip.ChipGroup>
371376
</LinearLayout>

0 commit comments

Comments
 (0)