Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
Launcher: every app in one sideways-scrolling row (single_row, dock_band_all)
benny117081f57f819e8
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java b/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.javaindex ea0030630..971e767ed 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java@@ -178,6 +178,8 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {private final int dockSize;/** config dock_row: false makes the dock apps the first tiles of one plain grid (names shown, no empty slots). */private final boolean dockRow;+ /** config single_row: tiles sit in one sideways row, each as wide as a grid column would be. */+ private final boolean singleRow;/** config always_show_names: the alpha of an unfocused tile's name (0 hides it). */private final float restNameAlpha;/** cinematic_home: only then does a launch record the last-opened app the shelf uses. */@@ -227,6 +229,7 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {this.rowsBelowDock = cfg.rowsBelowDock;this.dockTitle = cfg.dockTitle;this.dockRow = cfg.dockRow;+ this.singleRow = cfg.singleRow;this.restNameAlpha = cfg.alwaysShowNames ? 0.75f : 0f;this.cinematic = cfg.cinematicHome;this.launchActions = cfg.launchActions;@@ -402,6 +405,8 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {v.setPadding(v.getPaddingLeft(), pad, v.getPaddingRight(), pad);}name.setLayoutParams(nameLp);+ // A sideways row would stretch a match_parent item across the whole screen: give it a grid column's width.+ if (singleRow) v.getLayoutParams().width = inner / dockSize;return new Holder(v, listener, animations, advancedEffects, reducedMotion, restNameAlpha, focusOvershoot);}@@ -425,7 +430,9 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {h.card.setFocusable(true);h.name.setText(e.name);// The dock has no labels, unless always_show_names asks for them (DockDecoration then makes room in the band).- h.name.setVisibility(dockRow && position < dockSize && restNameAlpha == 0f ? View.INVISIBLE : View.VISIBLE);+ // In a single row every tile is the dock's kind: the big title above names it.+ boolean dockKind = dockRow && (singleRow || position < dockSize);+ h.name.setVisibility(dockKind && restNameAlpha == 0f ? View.INVISIBLE : View.VISIBLE);boolean focused = h.card.isFocused(); // a rebind after reload() can hit the focused tileh.name.setAlpha(focused ? 1f : restNameAlpha);h.card.setScaleX(focused && animations ? focusScale() : 1f);diff --git a/launcher/app/src/main/java/com/gathin/tvhome/Config.java b/launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex 6252d6d4b..f25a3412b 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@ -206,6 +206,10 @@ final class Config {final boolean handleViewInputs;/** Hold OK on a tile opens a menu (Move, Remove from Home, App info) instead of App info (config.xml / theme tile_menu). */final boolean tileMenu;+ /** Every app in the dock's row, which scrolls sideways, and no grid below it (config.xml, single_row); needs dock_row. */+ final boolean singleRow;+ /** With single_row, the band runs behind every app in the row, not only the dock apps (config.xml, dock_band_all). */+ final boolean dockBandAll;private Config(List<String> dockApps, boolean fillDock, List<String> hiddenApps, List<String> libraryApps, String liveTvPackage,String liveTvAction, String liveTvInputId, Map<String, String> launchActions, Map<String, String> appLabels,@@ -220,7 +224,7 @@ final class Config {List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, boolean appGlow, boolean fadeRows, int homeIdleClockMinutes,boolean keyFilter, boolean dockGlass, String glowStyle, boolean wallpaperCaptions,boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor, int cinematicScrim, int cinematicArt,- Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough) {+ Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean singleRow, boolean dockBandAll) {this.handleViewInputs = handleViewInputs;this.tileMenu = tileMenu;this.inputKeycodes = inputKeycodes;@@ -300,6 +304,8 @@ final class Config {this.cinematicScrim = cinematicScrim;this.wallpaperMoods = wallpaperMoods;this.gamepadPassthrough = gamepadPassthrough;+ this.singleRow = singleRow;+ this.dockBandAll = dockBandAll;this.glowStyle = glowStyle(glowStyle);this.wallpaperCaptions = wallpaperCaptions;}@@ -387,6 +393,8 @@ final class Config {int cinematicScrim = res.getInteger(R.integer.cinematic_scrim);Map<String, Set<String>> wallpaperMoods = moods(res.getString(R.string.wallpaper_moods));String glowStyle = res.getString(R.string.glow_style);+ boolean singleRow = res.getBoolean(R.bool.single_row);+ boolean dockBandAll = res.getBoolean(R.bool.dock_band_all);boolean applied = false;File dir = dir(ctx);@@ -466,6 +474,8 @@ final class Config {cinematicScrim = integer(json, "cinematic_scrim", cinematicScrim, 0, 100);JSONObject moods = json.optJSONObject("wallpaper_moods");if (moods != null) wallpaperMoods = moods(moods);+ singleRow = bool(json, "single_row", singleRow);+ dockBandAll = bool(json, "dock_band_all", dockBandAll);glowStyle = string(json, "glow_style", glowStyle);}// A theme push or reset invalidates choices made on the TV. On first use, remember the@@ -520,7 +530,7 @@ final class Config {Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, restoreKeyServices, wallpaperEnabled, wallpaper,wallpapers, rotationMinutes, wallpaperDim, dockOpacity, wallpaperOrder, applied,festival, inputKeycodes, appKeys, stockHomeRedirect, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow, fadeRows,- Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt, wallpaperMoods, gamepadPassthrough);+ Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt, wallpaperMoods, gamepadPassthrough, singleRow && dockRow, dockBandAll);}/**diff --git a/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java b/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.javaindex 5fef6e9ed..e6de8b42f 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java@@ -28,6 +28,10 @@ public class DockDecoration extends RecyclerView.ItemDecoration {private final boolean evenPadding;/** The band's top and bottom the glass gradient was made for; it is remade when they move. */private float shaderTop = Float.NaN, shaderBottom = Float.NaN;+ /** single_row: the tiles after the dock share its row, so they take the same offsets to stay level with it. */+ private final boolean singleRow;+ /** dock_band_all: in a single row, the band runs behind every app instead of the dock apps only. */+ private final boolean bandAll;/*** @param translucent the cinematic shelf's band: the artwork and the glow show through it.@@ -35,10 +39,14 @@ public class DockDecoration extends RecyclerView.ItemDecoration {* @param opacity the plain band's opacity in percent (dock_opacity), so a wallpaper can show through it.* @param lightGlass a light frosted band like the pills, for a sky or wallpaper behind it.* @param evenPadding the band's padding is the gap between the tiles on all four sides (dock_even_padding).+ * @param singleRow every app sits in the dock's row (single_row); the band covers the dock apps only, unless bandAll.+ * @param bandAll with singleRow, the band runs behind every app in the row (dock_band_all).*/DockDecoration(int dockSize, float density, boolean translucent, boolean names, int opacity, boolean lightGlass,- boolean evenPadding) {+ boolean evenPadding, boolean singleRow, boolean bandAll) {this.dockSize = dockSize;+ this.singleRow = singleRow;+ this.bandAll = singleRow && bandAll;this.density = density;this.namesRoom = names ? 22 * density : 0;this.lightGlass = lightGlass;@@ -67,7 +75,7 @@ public class DockDecoration extends RecyclerView.ItemDecoration {public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent,@NonNull RecyclerView.State state) {int pos = parent.getChildAdapterPosition(view);- if (pos >= 0 && pos < dockSize) {+ if (pos >= 0 && (singleRow || pos < dockSize)) {outRect.top = (int) (6 * density);outRect.bottom = (int) (12 * density);}@@ -80,7 +88,7 @@ public class DockDecoration extends RecyclerView.ItemDecoration {for (int i = 0; i < parent.getChildCount(); i++) {View child = parent.getChildAt(i);int pos = parent.getChildAdapterPosition(child);- if (pos < 0 || pos >= dockSize) continue;+ if (pos < 0 || (!bandAll && pos >= dockSize)) continue;RecyclerView.ViewHolder vh = parent.getChildViewHolder(child);View card = vh instanceof AppAdapter.Holder ? ((AppAdapter.Holder) vh).card : child.findViewById(R.id.card);if (card == null) continue;@@ -109,15 +117,22 @@ public class DockDecoration extends RecyclerView.ItemDecoration {if (evenPadding) {// The same padding on all four sides, so the band's corners are concentric with the tiles' everywhere.int inner = parent.getWidth() - parent.getPaddingLeft() - parent.getPaddingRight();- float room = Math.min(rect.top, Math.min(rect.left, parent.getWidth() - rect.right)) - density;+ // A single row's tiles can run off the screen, so only its top limits the padding; its ends are clamped below.+ float room = (singleRow ? rect.top : Math.min(rect.top, Math.min(rect.left, parent.getWidth() - rect.right))) - density;float even = evenPaddingPx(inner, dockSize, cardWidth, room);rect.inset(-even, -even);radius = radiusPx(radius, even);} else {// dock_even_padding off: the band as before, with its fixed 26 dp corners.- rect.inset(-side, -pad);+ rect.inset(singleRow ? -sidePad : -side, -pad);radius = 26 * density;}+ if (singleRow) {+ // Tiles past the screen's edge: the band stops at the grid's edge with its rounded end instead of being+ // sliced square there.+ rect.left = Math.max(rect.left, density);+ rect.right = Math.min(rect.right, parent.getWidth() - density);+ }rect.bottom += namesRoom;if (lightGlass && (rect.top != shaderTop || rect.bottom != shaderBottom)) {// The pills' glass (pill_bg: white, 18% fading to 8%), a little fainter over this much larger area.diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex dca4f8424..ca0852430 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -71,7 +71,6 @@ import android.widget.TextView;import android.widget.Toast;import androidx.annotation.NonNull;-import androidx.dynamicanimation.animation.DynamicAnimation;import androidx.dynamicanimation.animation.FloatPropertyCompat;import androidx.dynamicanimation.animation.SpringAnimation;import androidx.dynamicanimation.animation.SpringForce;@@ -196,6 +195,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {// How far the grid has scrolled the glass. springY works without it, in grid content space, so a// scroll moves the glass in lockstep with its tile instead of becoming a moving spring target.private float glassScrollShift;+ /** The same for springX, when single_row scrolls the grid sideways. */+ private float glassScrollShiftX;private int glassCardW; // width of the tile the glass was last fitted toprivate boolean glassShown;private final Rect tileRect = new Rect();@@ -215,6 +216,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {private boolean reducedMotion;/** config.xml dock_row: the first row is a separate dock (band, parked low, top shelf) rather than plain grid. */private boolean dockRow;+ /** config single_row: every app in the dock's row, scrolling sideways, no grid below. */+ private boolean singleRow;/** The highlight springs past its target (config.xml, focus_overshoot); false goes straight there. */private boolean focusOvershoot;/** Festive skin from the theme (see Festival); applied while it is active today. */@@ -368,6 +371,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {advancedEffects = cfg.animations && cfg.advancedEffects;reducedMotion = cfg.reducedMotion;dockRow = cfg.dockRow;+ singleRow = cfg.singleRow;focusOvershoot = cfg.focusOvershoot;festival = cfg.festival;festive = festival.active(LocalDate.now());@@ -458,7 +462,9 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {grid = findViewById(R.id.grid);rtlAppGrid = getResources().getBoolean(R.bool.rtl_app_grid);// Mirror only the app grid; the header and other locales keep their own layouts.- grid.setLayoutManager(new GridLayoutManager(this, COLUMNS) {+ // single_row: one span laid out sideways, so the same adapter, glass and dock band serve a scrolling row.+ grid.setLayoutManager(new GridLayoutManager(this, singleRow ? 1 : COLUMNS,+ singleRow ? RecyclerView.HORIZONTAL : RecyclerView.VERTICAL, false) {@Overrideprotected boolean isLayoutRTL() {return rtlAppGrid;@@ -477,6 +483,21 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {public boolean requestChildRectangleOnScreen(@NonNull RecyclerView parent, @NonNull View child,@NonNull Rect rect, boolean immediate,boolean focusedChildVisible) {+ if (singleRow) {+ // Sideways: scroll just enough to bring the tile's cell inside the padding. Cells are a+ // column wide, so the row moves a whole tile at a time and the tiles stay on the columns.+ // The whole cell, not the card rect passed in: the card is narrower and centred in it.+ int left = child.getLeft();+ int right = child.getRight();+ int dx;+ if (left < getPaddingLeft()) dx = left - getPaddingLeft();+ else if (right > getWidth() - getPaddingRight()) dx = right - (getWidth() - getPaddingRight());+ else dx = 0;+ if (dx == 0) return false;+ if (immediate || reducedMotion || !animations) parent.scrollBy(dx, 0);+ else parent.smoothScrollBy(dx, 0);+ return true;+ }if (dockRow && getPosition(child) < COLUMNS) return false;int top = child.getTop() + rect.top;int bottom = top + rect.height();@@ -495,7 +516,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {}});((GridLayoutManager) grid.getLayoutManager()).setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {- @Override public int getSpanSize(int position) { return adapter != null && adapter.isLibraryAt(position) ? COLUMNS : 1; }+ @Override public int getSpanSize(int position) { return !singleRow && adapter != null && adapter.isLibraryAt(position) ? COLUMNS : 1; }});grid.setHasFixedSize(true);grid.setItemAnimator(null);@@ -511,7 +532,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {public void onChildViewDetachedFromWindow(@NonNull View v) {}});- if (dockRow) grid.addItemDecoration(new DockDecoration(COLUMNS, density, cinematic, cfg.alwaysShowNames, cfg.dockOpacity, cfg.dockGlass, cfg.dockEvenPadding));+ if (dockRow) grid.addItemDecoration(new DockDecoration(COLUMNS, density, cinematic, cfg.alwaysShowNames, cfg.dockOpacity, cfg.dockGlass, cfg.dockEvenPadding,+ singleRow, cfg.dockBandAll));if (cfg.fadeRows) TopFade.attach(grid, 48 * density);// Reduced motion: the tiles are simply there, with no entrance (reloadApps skips it there too).if (animations && !reducedMotion) {@@ -545,8 +567,28 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {if (MainActivity.this.dockRow && cfg.dockTitle && rowsBelowDock > 0) want = Math.max(want, (int) (AppAdapter.TITLE_ROOM_DP * density));// No dock to push down: the grid starts at the top, with room for the first row's zoom and glass.if (!MainActivity.this.dockRow) want = (int) (AppAdapter.TOP_ROOM_DP * density);+ // A single row never shows the names under its tiles (the title above the row names the app), so the+ // 7dp gap and 22dp label item_app.xml keeps for them would only lift the row: sit it that much lower.+ if (singleRow && !cfg.alwaysShowNames) want += (int) (29 * density);if (grid.getPaddingTop() != want) {grid.setPadding(grid.getPaddingLeft(), want, grid.getPaddingRight(), grid.getPaddingBottom());+ // A vertical grid parks the dock on the new padding line by scrolling (onTileFocused); a sideways+ // row cannot scroll vertically, and the layout request made from inside this layout pass is+ // dropped, so lay the row out again on the next frame. The glass and the title were placed for the+ // old position, so fit them again once it has moved.+ if (singleRow) grid.post(() -> {+ grid.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {+ @Override+ public void onGlobalLayout() {+ grid.getViewTreeObserver().removeOnGlobalLayoutListener(this);+ int pos = Math.max(0, Math.min(lastFocused, adapter.appCount() - 1));+ RecyclerView.ViewHolder vh = grid.findViewHolderForAdapterPosition(pos);+ View card = vh == null ? null : vh.itemView.findViewById(R.id.card);+ if (card != null && card.isFocused()) onTileFocused(pos, card);+ }+ });+ grid.requestLayout();+ });}// Cold start or column count > 4: the first focus can run before the grid has its final width or// padding, leaving the glass at the XML design size until a key is pressed.@@ -561,11 +603,27 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {glassTargetY -= dy;glassScrollShift -= dy;glass.setTranslationY(glass.getTranslationY() - dy);+ // single_row scrolls sideways: the same bookkeeping on the other axis.+ if (dx != 0) {+ glassTargetX -= dx;+ glassScrollShiftX -= dx;+ glass.setTranslationX(glass.getTranslationX() - dx);+ }}});// Liquid feel: soft springs on the highlight's position.- springX = new SpringAnimation(glass, DynamicAnimation.TRANSLATION_X);+ springX = new SpringAnimation(glass, new FloatPropertyCompat<View>("glassContentX") {+ @Override+ public float getValue(View v) {+ return v.getTranslationX() - glassScrollShiftX;+ }++ @Override+ public void setValue(View v, float value) {+ v.setTranslationX(value + glassScrollShiftX);+ }+ });springY = new SpringAnimation(glass, new FloatPropertyCompat<View>("glassContentY") {@Overridepublic float getValue(View v) {@@ -663,7 +721,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {if (keyCode == KeyEvent.KEYCODE_DPAD_UP) return true;if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {// Back to the dock tile Up came from, not wherever the focus finder lands.- focusTile(lastFocused % COLUMNS);+ focusTile(singleRow ? lastFocused : lastFocused % COLUMNS);return true;}int firstButton = btnInputs.getVisibility() == View.VISIBLE ? R.id.btnInputs : firstTopButton().getId();@@ -1394,6 +1452,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {drop();return;}+ // A single row has no rows to move between: Up and Down leave the carried tile where it is.+ if (singleRow && (keyCode == KeyEvent.KEYCODE_DPAD_UP || keyCode == KeyEvent.KEYCODE_DPAD_DOWN)) return;int to;// rtl_app_grid (Hebrew) mirrors the grid: position 0 is on the right, so Left moves towards the end.if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) to = rtlAppGrid ? from + 1 : from - 1;@@ -1419,7 +1479,9 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {GridLayoutManager lm = (GridLayoutManager) grid.getLayoutManager();int first = lm.findFirstVisibleItemPosition();View firstView = first != RecyclerView.NO_POSITION ? lm.findViewByPosition(first) : null;- int offset = firstView != null ? lm.getDecoratedTop(firstView) - grid.getPaddingTop() : 0;+ // single_row scrolls sideways, so its first visible tile is pinned by its left edge instead.+ int offset = firstView == null ? 0 : singleRow ? lm.getDecoratedLeft(firstView) - grid.getPaddingLeft()+ : lm.getDecoratedTop(firstView) - grid.getPaddingTop();change.run();if (firstView != null) lm.scrollToPositionWithOffset(first, offset);}@@ -1511,8 +1573,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {glassTargetX = x;glassTargetY = y;// Cinematic shelf: the highlight glows in the dock app's colour, plain white in the grid (and on the dock with- // cinematic_white_focus). app_glow: every tile.- boolean coloured = (appGlow || cinematic && !cinematicWhiteFocus && position < COLUMNS) && !festive;+ // cinematic_white_focus). app_glow: every tile. In a single row every tile is the dock's kind.+ boolean coloured = (appGlow || cinematic && !cinematicWhiteFocus && (singleRow || position < COLUMNS)) && !festive;int accent = coloured ? adapter.ambientColorAt(position) : 0;if ((cinematic || appGlow) && !festive && accent != glassAccent) {glassAccent = accent;@@ -1532,17 +1594,18 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {glass.setTranslationX(x);glass.setTranslationY(y);} else {- springX.animateToFinalPosition(x);+ springX.animateToFinalPosition(x - glassScrollShiftX);springY.animateToFinalPosition(y - glassScrollShift);}View item = (View) card.getParent();- if (dockRow && position < COLUMNS) {- // Dock: park it at the bottom of the screen and show the top shelf for this app.+ if (dockRow && (singleRow || position < COLUMNS)) {+ // Dock: park it at the bottom of the screen and show the top shelf for this app. In a single row+ // every tile is in the dock's row, which never scrolls vertically.int decoratedTop = item.getTop() - (int) (6 * density);int dy = decoratedTop - grid.getPaddingTop();// A 1px mismatch used to start a scroll on every dock move. Only scroll when the row is// actually off; reduced motion does it in one jump so it does not fight the highlight.- boolean scroll = Math.abs(dy) > (int) (8 * density);+ boolean scroll = !singleRow && Math.abs(dy) > (int) (8 * density);if (scroll) {if (!animations || reducedMotion) grid.scrollBy(0, dy);else grid.smoothScrollBy(0, dy);@@ -2093,6 +2156,19 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {public boolean onTileVerticalKey(int position, int keyCode) {int count = adapter.appCount();int target;+ if (singleRow) {+ // One row: Up leaves for the top bar, Down has nowhere to go, and Left/Right walk the whole row,+ // stopping at its two ends (the default focus search scrolls the row to the next tile).+ if (keyCode == KeyEvent.KEYCODE_DPAD_UP) return false;+ if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) return true;+ boolean forward = rtlAppGrid ? keyCode == KeyEvent.KEYCODE_DPAD_LEFT : keyCode == KeyEvent.KEYCODE_DPAD_RIGHT;+ int last = adapter.focusablePosition(count - 1);+ if (forward && position >= last) {+ if (adapter.isLibraryAt(count)) focusLibrary();+ return true;+ }+ return !forward && position == 0;+ }// Horizontal: swallow the key at a row's ends so focus never wraps to the next row or// escapes up into the top bar. Mid-row moves fall through to the default focus search.if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex f600b7d60..fbc6dc39f 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -206,6 +206,13 @@through it. false (the default) keeps the solid near-black band, or the cinematic shelf's dark glass. Canalso be set with "dock_glass": true in a theme's config.json. --><bool name="dock_glass">false</bool>+ <!-- Every app in one row: the dock apps first, the rest after them, and the row scrolls sideways when focus+ reaches its edge. No grid below; rows_below_dock is ignored. Needs dock_row. Can also be set with+ "single_row" in a theme. -->+ <bool name="single_row">false</bool>+ <!-- With single_row, the band runs behind every app in the row, apps installed later included, instead of+ the dock apps only. Can also be set with "dock_band_all" in a theme. -->+ <bool name="dock_band_all">false</bool><!-- The dock band's padding equals the gap between its tiles on all four sides (as far as the grid's edges leave room),so its corners are concentric with the tiles' and the spacing reads even. false (the default) keeps the fixed14dp above and below, up to 22dp at the sides and 26dp corners. Can also be set with "dock_even_padding": true in a theme's config.json. -->diff --git a/themes/README.md b/themes/README.mdindex fd66ad533..4c637cfe8 100644--- a/themes/README.md+++ b/themes/README.md@@ -114,6 +114,8 @@ A new key needs one there in the same pull request.| `cinematic_art` | 0 to 100 | With `cinematic_home`, the opacity of the focused app's softened artwork (`50` by default); `0` leaves the wallpaper uncovered || `dock_even_padding` | bool | The dock band's padding equals the gap between its tiles on all four sides, as far as the grid's edges leave room (`false` by default) || `dock_glass` | bool | The dock band as light frosted glass like the top bar's pills (`false` by default); suits `sky_intensity` or a wallpaper, where the solid band reads as a dark slab |+| `single_row` | bool | Every app in the dock's row, the dock apps first, scrolling sideways; no grid below (`false` by default; needs `dock_row`) |+| `dock_band_all` | bool | With `single_row`, the band runs behind every app in the row, not only the dock apps (`false` by default) || `ambient_glow` | bool | The glow behind the dock in the focused app's colour (`true` by default); `false` keeps only `background_color` or the wallpaper, e.g. for a calm photo background || `app_glow` | bool | The focus highlight glows in the focused app's colour on every tile, as `cinematic_home` does for the dock (`false` by default) || `fade_rows` | bool | The rows fade out as they scroll up under the clock instead of being cut off at a hard line; the wallpaper or sky shows through. The grid then draws into a hardware layer (about 6 MB of graphics memory at 1080p) (`false` by default) |