app: Scaffold Android TV PeerTube client (MVP)
Start the SmartTube-inspired PeerTube TV client as a Kotlin + Compose for TV app. It targets any PeerTube instance (v1 API), with JTube as the default, and covers login 0, local/own video listings 1-2, search 3, subscriptions 4, server-backed history 5 and HLS/progressive playback with watching reports 6. Password is only used for the OAuth password grant and never stored; tokens are kept in EncryptedSharedPreferences. Building needs JDK 17+ (see README); the Gradle wrapper is checked in so no local Gradle is required.
This commit is contained in:
commit
59029438ad
40 changed files with 2605 additions and 0 deletions
22
app/src/main/res/drawable/app_banner.xml
Normal file
22
app/src/main/res/drawable/app_banner.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="#101010"
|
||||
android:pathData="M0,0h320v180h-320z" />
|
||||
<path
|
||||
android:fillColor="#CE2B2B"
|
||||
android:pathData="M40,40h64a8,8 0 0 1 8,8v64a8,8 0 0 1 -8,8h-64a8,8 0 0 1 -8,-8v-64a8,8 0 0 1 8,-8z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M60,62l26,20l-26,20z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M128,76h160v10h-160z" />
|
||||
<path
|
||||
android:fillColor="#66FFFFFF"
|
||||
android:pathData="M128,100h120v8h-120z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/icon_background.xml
Normal file
10
app/src/main/res/drawable/icon_background.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#101010"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
||||
17
app/src/main/res/drawable/icon_foreground.xml
Normal file
17
app/src/main/res/drawable/icon_foreground.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:translateX="30"
|
||||
android:translateY="30">
|
||||
<path
|
||||
android:fillColor="#CE2B2B"
|
||||
android:pathData="M4,4h40a4,4 0 0 1 4,4v40a4,4 0 0 1 -4,4h-40a4,4 0 0 1 -4,-4v-40a4,4 0 0 1 4,-4z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M20,21l13,10l-13,10z" />
|
||||
</group>
|
||||
</vector>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
|
|
@ -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="@drawable/icon_background" />
|
||||
<foreground android:drawable="@drawable/icon_foreground" />
|
||||
</adaptive-icon>
|
||||
4
app/src/main/res/values/colors.xml
Normal file
4
app/src/main/res/values/colors.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<resources>
|
||||
<color name="jtube_primary">#FFCE2B2B</color>
|
||||
<color name="jtube_background">#FF101010</color>
|
||||
</resources>
|
||||
12
app/src/main/res/values/strings.xml
Normal file
12
app/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<resources>
|
||||
<string name="app_name">JTube TV</string>
|
||||
<string name="destination_videos">Videos</string>
|
||||
<string name="destination_my_videos">My videos</string>
|
||||
<string name="destination_channels">Channels</string>
|
||||
<string name="destination_search">Search</string>
|
||||
<string name="destination_subscriptions">Subscriptions</string>
|
||||
<string name="destination_history">History</string>
|
||||
<string name="error_loading">Something went wrong</string>
|
||||
<string name="retry">Retry</string>
|
||||
<string name="empty_list">Nothing here yet</string>
|
||||
</resources>
|
||||
6
app/src/main/res/values/themes.xml
Normal file
6
app/src/main/res/values/themes.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
<style name="Theme.JTubeTV" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:colorPrimary">@color/jtube_primary</item>
|
||||
</style>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue