Skip to content

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

Launcher: game_day's panel rides up with the app cards and fades before the clock

Justin Newman5a45d1302993
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 84a654a3d..d43e2f3c5 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -683,6 +683,22 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
}
});
+ // game_day: the panel above the dock rides up with the cards instead of being covered by them, and fades
+ // out by the time it reaches the clock. The grid's own offset is read, so a jump (Home, a restored focus)
+ // lands right too.
+ if (gameDay != null) {
+ View clockBlock = findViewById(R.id.leftBlock);
+ grid.addOnScrollListener(new RecyclerView.OnScrollListener() {
+ @Override
+ public void onScrolled(@NonNull RecyclerView rv, int dx, int dy) {
+ int shift = rv.canScrollVertically(-1) ? rv.computeVerticalScrollOffset() : 0;
+ racePanel.setTranslationY(-shift);
+ int room = Math.max(1, racePanel.getTop() - clockBlock.getBottom());
+ racePanel.setAlpha(Math.max(0f, 1f - shift / (float) room));
+ }
+ });
+ }
+
// Liquid feel: soft springs on the highlight's position.
springX = new SpringAnimation(glass, new FloatPropertyCompat<View>("glassContentX") {
@Override