Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

launcher: dock band, more room at the sides so a focused first or last tile clears the rounded end

Cristian Rojasbb44a27e55fe
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java b/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
index 2868ef704..f9221bba1 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
@@ -64,7 +64,10 @@ public class DockDecoration extends RecyclerView.ItemDecoration {
// The band can only draw inside the grid, and the first and last dock tiles sit 12dp in from its
// edges: a full 14dp at the sides sliced the rounded ends flat (#454). Keep the sides, with the
// 1dp edge line, inside the grid; the top and bottom have room.
- float side = Math.max(0f, Math.min(pad, Math.min(rect.left, parent.getWidth() - rect.right) - density));
+ // 22dp at the sides (the grid's 10dp padding makes room): a focused first or last tile grows about 7dp
+ // outwards and still keeps about the band's top margin from its rounded end.
+ float sidePad = 22 * density;
+ float side = Math.max(0f, Math.min(sidePad, Math.min(rect.left, parent.getWidth() - rect.right) - density));
rect.inset(-side, -pad);
float radius = 26 * density;
c.drawRoundRect(rect, radius, radius, band);
diff --git a/launcher/app/src/main/res/layout-iw/activity_main.xml b/launcher/app/src/main/res/layout-iw/activity_main.xml
index e546dcec8..cb5cee41c 100644
--- a/launcher/app/src/main/res/layout-iw/activity_main.xml
+++ b/launcher/app/src/main/res/layout-iw/activity_main.xml
@@ -356,6 +356,8 @@
android:layout_height="match_parent"
android:paddingTop="10dp"
android:paddingBottom="40dp"
+ android:paddingStart="10dp"
+ android:paddingEnd="10dp"
android:clipToPadding="false"
android:clipChildren="false"
android:overScrollMode="never"
diff --git a/launcher/app/src/main/res/layout/activity_main.xml b/launcher/app/src/main/res/layout/activity_main.xml
index b8895f0f9..54a723d67 100644
--- a/launcher/app/src/main/res/layout/activity_main.xml
+++ b/launcher/app/src/main/res/layout/activity_main.xml
@@ -352,6 +352,8 @@
android:layout_height="match_parent"
android:paddingTop="10dp"
android:paddingBottom="40dp"
+ android:paddingStart="10dp"
+ android:paddingEnd="10dp"
android:clipToPadding="false"
android:clipChildren="false"
android:overScrollMode="never"