kart: TV leanback launcher entry + banner
- Commit
bdc1a806bdcaaa7bd6a26fe60aa61f47d8204b63- Author
- vayun-mathur <[email protected]>
- When
- 2026-10-18 18:56 UTC (1 month ago)
- Parents
81d4eec
Diff
games/kart/src/main/AndroidManifest.xml
diff --git a/games/kart/src/main/AndroidManifest.xml b/games/kart/src/main/AndroidManifest.xmlindex 35f7b04fca..f495c94f67 100644--- a/games/kart/src/main/AndroidManifest.xml+++ b/games/kart/src/main/AndroidManifest.xml@@ -10,9 +10,19 @@ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_LOCAL_NETWORK" /> + <!-- TV launcher presence: leanback declares this a TV app, touchscreen is+ optional (D-pad + phones-as-controllers are the inputs). Mirrors cast/tv. -->+ <uses-feature+ android:name="android.software.leanback"+ android:required="true" />+ <uses-feature+ android:name="android.hardware.touchscreen"+ android:required="false" />+ <application android:allowBackup="true" android:backupAgent=".platform.AppBackupAgent"+ android:banner="@drawable/banner" android:dataExtractionRules="@xml/data_extraction_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name"@@ -27,6 +37,8 @@ <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />+ <!-- TV launcher row: without this the app is invisible on Google TV. -->+ <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter> <!-- Pairs with openSettingsIfRequested, so App Info's settings cog deep-links there. --> <intent-filter>
games/kart/src/main/res/drawable/banner.xml
diff --git a/games/kart/src/main/res/drawable/banner.xml b/games/kart/src/main/res/drawable/banner.xmlnew file mode 100644index 0000000000..0751032928--- /dev/null+++ b/games/kart/src/main/res/drawable/banner.xml@@ -0,0 +1,24 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- TV launcher banner (320x180, xhdpi baseline): dark backdrop with the same+ directions_car glyph the adaptive launcher icon uses, so the TV row matches+ the phone icon. cast/tv banner.xml is the shape precedent. -->+<vector xmlns:android="http://schemas.android.com/apk/res/android"+ android:width="320dp"+ android:height="180dp"+ android:viewportWidth="320"+ android:viewportHeight="180">+ <path+ android:fillColor="#FF1B1B1F"+ android:pathData="M0,0h320v180H0z" />+ <group+ android:pivotX="0"+ android:pivotY="0"+ android:scaleX="0.104"+ android:scaleY="0.104"+ android:translateX="110"+ android:translateY="40">+ <path+ android:fillColor="#FFFFFFFF"+ android:pathData="M240,760L240,800Q240,817 228.5,828.5Q217,840 200,840L160,840Q143,840 131.5,828.5Q120,817 120,800L120,480L204,240Q210,222 225.5,211Q241,200 260,200L700,200Q719,200 734.5,211Q750,222 756,240L840,480L840,800Q840,817 828.5,828.5Q817,840 800,840L760,840Q743,840 731.5,828.5Q720,817 720,800L720,760L240,760ZM232,400L728,400L686,280L274,280L232,400ZM200,480L200,480L200,680L200,680L200,480ZM300,640Q325,640 342.5,622.5Q360,605 360,580Q360,555 342.5,537.5Q325,520 300,520Q275,520 257.5,537.5Q240,555 240,580Q240,605 257.5,622.5Q275,640 300,640ZM660,640Q685,640 702.5,622.5Q720,605 720,580Q720,555 702.5,537.5Q685,520 660,520Q635,520 617.5,537.5Q600,555 600,580Q600,605 617.5,622.5Q635,640 660,640ZM200,680L760,680L760,480L200,480L200,680Z" />+ </group>+</vector>