Skip to content

Commit 136d992

Browse files
ADFA-4886: restyle the collapsed-bar handle as a Material 3 tab
Make the recovery handle read as the nav bar's own surface peeking from the bottom edge instead of a separate button: a colorSurfaceContainer tab with rounded top corners and 8dp elevation (matching the bar), carrying a drag grabber tinted colorOnSurfaceVariant. Drops the now-unused ic_expand_less.
1 parent 17a8788 commit 136d992

4 files changed

Lines changed: 28 additions & 14 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- ADFA-4886: the collapsed-bar handle reads as the nav bar's own surface peeking from the
3+
bottom edge — same colorSurfaceContainer as the bar, rounded top corners only. -->
4+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
5+
android:shape="rectangle">
6+
<solid android:color="?attr/colorSurfaceContainer" />
7+
<corners
8+
android:topLeftRadius="14dp"
9+
android:topRightRadius="14dp"
10+
android:bottomLeftRadius="0dp"
11+
android:bottomRightRadius="0dp" />
12+
</shape>

‎controller/app/src/main/res/drawable/ic_expand_less.xml‎

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="32dp" android:height="24dp"
3+
android:viewportWidth="32" android:viewportHeight="24"
4+
android:tint="?attr/colorControlNormal">
5+
<path android:fillColor="#FF000000"
6+
android:pathData="M8,10h16a2,2 0 0 1 0,4h-16a2,2 0 0 1 0,-4z"/>
7+
</vector>

‎controller/app/src/main/res/layout/activity_portal.xml‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@
1414

1515
<!-- ADFA-4886: nav chrome uses Material 3 vector icons + theme attributes (system day/night)
1616
instead of emoji/glyph text buttons. Icon-only buttons carry a contentDescription. -->
17+
<!-- Collapsed-bar handle: a Material 3 tab of the bar's own surface with a drag grabber,
18+
so it reads as the nav bar peeking from the bottom edge rather than a separate button. -->
1719
<ImageButton
1820
android:id="@+id/btnHandle"
19-
android:layout_width="60dp"
20-
android:layout_height="32dp"
21+
android:layout_width="56dp"
22+
android:layout_height="24dp"
2123
android:layout_alignParentBottom="true"
2224
android:layout_centerHorizontal="true"
23-
android:alpha="0.8"
24-
android:background="?attr/colorSurfaceContainerHighest"
25+
android:background="@drawable/bg_nav_handle"
2526
android:contentDescription="@string/k2go_nav_show_bar"
26-
android:padding="4dp"
27-
android:scaleType="fitCenter"
27+
android:elevation="8dp"
28+
android:padding="0dp"
29+
android:scaleType="center"
2830
android:tint="?attr/colorOnSurfaceVariant"
29-
app:srcCompat="@drawable/ic_expand_less" />
31+
app:srcCompat="@drawable/ic_nav_grabber" />
3032

3133
<LinearLayout
3234
android:id="@+id/bottomNav"

0 commit comments

Comments
 (0)