Skip to content

Commit

Permalink
Android tv view support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Feb 15, 2024
1 parent 98c2943 commit 84accc0
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >

<!-- Internet -->
<!-- Android TV -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

<!-- Internet -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Expand Down Expand Up @@ -47,7 +51,8 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Tachiyomi">
android:theme="@style/Theme.Tachiyomi"
android:banner="@mipmap/ic_banner">

<activity
android:name=".ui.main.MainActivity"
Expand All @@ -58,6 +63,7 @@
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>

<!-- Deep link to add manga repos -->
Expand Down
53 changes: 53 additions & 0 deletions app/src/main/res/drawable/ic_banner_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="320dp"
android:height="180dp"
android:viewportWidth="700"
android:viewportHeight="800">
<group android:scaleX="0.6666667"
android:scaleY="0.6666667"
android:translateX="116.666664"
android:translateY="133.33333">
<group android:scaleX="0.29573205"
android:scaleY="0.61"
android:translateX="57.493786"
android:translateY="156">
<path
android:pathData="m103.2,700.9c27.7,-16.5 248.4,-124.3 432,-237.3 47.2,-29 80.7,-104.7 77.9,-164.1 -4.2,-88.6 -36.9,-93 -33.7,-153.8 -15.4,31.6 -32.7,57.1 -26.5,125.5 1.7,-21.6 21.2,-59.1 31.6,-26.7 26.6,143.4 -104.3,205.4 -130.3,205.5 118.4,-134.3 59.7,-273.7 110.6,-310.4 -16.8,4 -65.7,-12 -76,75.1 -11.4,133.1 -40.3,146.8 -77,181.1 41.7,-44.9 57.4,-114.4 61.6,-198.3 1.6,-31.3 11.3,-41.1 28.7,-53.9 -41.8,6.1 -72.8,29.5 -78.6,63.4 -15.4,90 -26.6,109.8 -62.6,138 55,-76 33.4,-140.8 26,-164.5 -1.5,50.1 -14.1,77.5 -41,99.3 17.1,-27.5 20.3,-64.8 18.5,-98.7 -13.2,45.9 -61.1,45.6 -89.1,51.2 -158.5,31.9 -125.1,200.9 -114.2,220.4 48.1,-77.8 108,-65.1 124.8,-50.2 -14.4,58.2 -16.8,106.9 73.2,113.3l-166.9,106.8 -0.3,-67.3z"
android:fillColor="#808080"
android:strokeColor="#00000000"/>
<path
android:pathData="m100.5,699.8c27.7,-16.5 248.4,-124.3 432,-237.3 47.2,-29 80.7,-104.7 77.9,-164.1 -4.2,-88.6 -36.9,-93 -33.7,-153.8 -15.4,31.6 -32.7,57.1 -26.5,125.5 1.7,-21.6 21.2,-59.1 31.6,-26.7 26.6,143.4 -104.3,205.4 -130.3,205.5 118.4,-134.3 59.7,-273.7 110.6,-310.4 -16.8,4 -65.7,-12 -76,75.1 -11.4,133.1 -40.3,146.8 -77,181.1 41.7,-44.9 57.4,-114.4 61.6,-198.3 1.6,-31.3 11.3,-41.1 28.7,-53.9 -41.8,6.1 -72.8,29.5 -78.6,63.4 -15.4,90 -26.6,109.8 -62.6,138 55,-76 33.4,-140.8 26,-164.5 -1.5,50.1 -14.1,77.5 -41,99.3 17.1,-27.5 20.3,-64.8 18.5,-98.7 -13.2,45.9 -61.1,45.6 -89.1,51.2 -158.5,31.9 -125.1,200.9 -114.2,220.4 48.1,-77.8 108,-65.1 124.8,-50.2 -14.4,58.2 -16.8,106.9 73.2,113.3l-166.9,106.8 -0.3,-67.3z"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeLineCap="butt"/>
</group>

<group android:scaleX="0.5658"
android:scaleY="0.2578962"
android:translateX="316.8"
android:translateY="75.346725">
<group android:translateY="158.48438">
<path android:pathData="M73.96875,-17.015625L37.6875,-17.015625L32.703125,-0L0.140625,-0L38.890625,-103.078125L73.625,-103.078125L112.359375,-0L79.03125,-0L73.96875,-17.015625ZM67.296875,-39.3125L55.90625,-76.359375L44.578125,-39.3125L67.296875,-39.3125Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M120.65625,-74.671875L147.29688,-74.671875L147.29688,-62.515625Q153.28125,-69.96875,159.39062,-73.15625Q165.51562,-76.359375,174.29688,-76.359375Q186.1875,-76.359375,192.89062,-69.296875Q199.60938,-62.234375,199.60938,-47.46875L199.60938,0L170.85938,0L170.85938,-41.0625Q170.85938,-48.09375,168.25,-51.015625Q165.65625,-53.9375,160.9375,-53.9375Q155.73438,-53.9375,152.5,-50Q149.26562,-46.0625,149.26562,-35.859375L149.26562,0L120.65625,0L120.65625,-74.671875Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M217.70312,-103.078125L246.32812,-103.078125L246.32812,-83.609375L217.70312,-83.609375L217.70312,-103.078125ZM217.70312,-74.671875L246.32812,-74.671875L246.32812,0L217.70312,0L217.70312,-74.671875Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M264.85938,-74.671875L291.57812,-74.671875L291.57812,-63.78125Q297.34375,-70.59375,303.21875,-73.46875Q309.09375,-76.359375,317.39062,-76.359375Q326.3125,-76.359375,331.51562,-73.1875Q336.71875,-70.03125,340.03125,-63.78125Q346.78125,-71.09375,352.32812,-73.71875Q357.89062,-76.359375,366.04688,-76.359375Q378.0625,-76.359375,384.8125,-69.21875Q391.5625,-62.09375,391.5625,-46.90625L391.5625,0L362.875,0L362.875,-42.546875Q362.875,-47.609375,360.90625,-50.0625Q358.03125,-53.9375,353.73438,-53.9375Q348.67188,-53.9375,345.57812,-50.28125Q342.48438,-46.625,342.48438,-38.53125L342.48438,0L313.79688,0L313.79688,-41.140625Q313.79688,-46.0625,313.23438,-47.8125Q312.32812,-50.625,310.07812,-52.34375Q307.82812,-54.078125,304.79688,-54.078125Q299.875,-54.078125,296.70312,-50.34375Q293.54688,-46.625,293.54688,-38.109375L293.54688,0L264.85938,0L264.85938,-74.671875Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M491.54688,-30.234375L434.17188,-30.234375Q434.95312,-23.34375,437.90625,-19.96875Q442.04688,-15.125,448.73438,-15.125Q452.95312,-15.125,456.75,-17.234375Q459.0625,-18.5625,461.73438,-21.9375L489.9375,-19.34375Q483.46875,-8.09375,474.32812,-3.203125Q465.1875,1.6875,448.09375,1.6875Q433.26562,1.6875,424.75,-2.5Q416.25,-6.6875,410.65625,-15.78125Q405.0625,-24.890625,405.0625,-37.203125Q405.0625,-54.703125,416.28125,-65.53125Q427.5,-76.359375,447.25,-76.359375Q463.28125,-76.359375,472.5625,-71.5Q481.84375,-66.65625,486.6875,-57.4375Q491.54688,-48.234375,491.54688,-33.46875L491.54688,-30.234375ZM462.4375,-43.953125Q461.59375,-52.25,457.96875,-55.828125Q454.35938,-59.421875,448.45312,-59.421875Q441.625,-59.421875,437.54688,-54Q434.95312,-50.625,434.25,-43.953125L462.4375,-43.953125Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M499.3125,-103.078125L596.125,-103.078125L596.125,-77.625L563.6406,-77.625L563.6406,0L531.7969,0L531.7969,-77.625L499.3125,-77.625L499.3125,-103.078125Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M634.7344,-50.484375L607.3906,-53.375Q608.9375,-60.546875,611.84375,-64.65625Q614.7656,-68.765625,620.25,-71.796875Q624.1875,-73.96875,631.0781,-75.15625Q637.96875,-76.359375,645.9844,-76.359375Q658.8594,-76.359375,666.65625,-74.921875Q674.46875,-73.484375,679.6719,-68.90625Q683.3281,-65.75,685.4375,-59.9375Q687.5469,-54.140625,687.5469,-48.875L687.5469,-15.890625Q687.5469,-10.625,688.2031,-7.625Q688.875,-4.640625,691.125,0L664.2656,0Q662.65625,-2.890625,662.15625,-4.390625Q661.6719,-5.90625,661.1719,-9.140625Q655.5469,-3.734375,650,-1.40625Q642.40625,1.6875,632.34375,1.6875Q618.9844,1.6875,612.0625,-4.5Q605.1406,-10.6875,605.1406,-19.765625Q605.1406,-28.265625,610.125,-33.75Q615.125,-39.234375,628.5469,-41.90625Q644.65625,-45.140625,649.4375,-46.4375Q654.21875,-47.75,659.5625,-49.859375Q659.5625,-55.125,657.375,-57.234375Q655.2031,-59.34375,649.71875,-59.34375Q642.6875,-59.34375,639.1719,-57.09375Q636.4219,-55.34375,634.7344,-50.484375ZM659.5625,-35.4375Q653.65625,-33.328125,647.25,-31.71875Q638.53125,-29.390625,636.21875,-27.140625Q633.8281,-24.828125,633.8281,-21.875Q633.8281,-18.5,636.1719,-16.34375Q638.53125,-14.203125,643.1094,-14.203125Q647.8906,-14.203125,652,-16.515625Q656.1094,-18.84375,657.8281,-22.1875Q659.5625,-25.53125,659.5625,-30.875L659.5625,-35.4375Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M705.7031,-103.078125L734.3281,-103.078125L734.3281,-83.609375L705.7031,-83.609375L705.7031,-103.078125ZM705.7031,-74.671875L734.3281,-74.671875L734.3281,0L705.7031,0L705.7031,-74.671875Z"
android:fillColor="#FFFFFF"/>
<path android:pathData="M753.6406,-103.078125L782.3281,-103.078125L782.3281,0L753.6406,0L753.6406,-103.078125Z"
android:fillColor="#FFFFFF"/>
</group>
</group>
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_banner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_banner_background"/>
<foreground android:drawable="@mipmap/ic_banner_foreground"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-xhdpi/ic_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_banner_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_banner_background">#9D0F3B</color>
</resources>

0 comments on commit 84accc0

Please sign in to comment.