Skip to content

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

launcher: focusing the last visible row no longer nudges the grid up

Samuel Hinton564dcb22dd26
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index d7c86c17d..54cad511c 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -276,7 +276,9 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
if (getPosition(child) < COLUMNS) return false;
int top = child.getTop() + rect.top;
int bottom = top + rect.height();
- int limitBottom = getHeight() - getPaddingBottom();
+ // The grid's bottom edge, not its padding: paddingBottom only lets the last row scroll clear of
+ // the edge, and treating it as off-screen nudged the grid up whenever the last visible row got focus.
+ int limitBottom = getHeight();
int dy;
if (top < 0) dy = top;
else if (bottom > limitBottom) dy = Math.min(top, bottom - limitBottom);