Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the library screen and the podcast details page to the TV app #1294

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Jetcaster/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#####
[versions]
accompanist = "0.34.0"
androidGradlePlugin = "8.2.0"
androidGradlePlugin = "8.3.1"
androidx-activity-compose = "1.8.2"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.2.3"
androidx-benchmark-junit4 = "1.2.3"
androidx-compose-bom = "2024.02.02"
androidx-compose-bom = "2024.03.00"
androidx-constraintlayout = "1.0.1"
androidx-corektx = "1.13.0-alpha05"
androidx-corektx = "1.13.0-beta01"
androidx-glance = "1.0.0"
androidx-lifecycle-runtime = "2.7.0"
androidx-lifecycle-compose = "2.7.0"
Expand All @@ -34,7 +34,7 @@ compose-compiler = "1.5.4"
coroutines = "1.8.0"
google-maps = "18.2.0"
gradle-versions = "0.51.0"
hilt = "2.49"
hilt = "2.51"
hiltExt = "1.2.0"
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
jdkDesugar = "2.0.4"
Expand Down
4 changes: 4 additions & 0 deletions Jetcaster/tv-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.material.iconsExtended)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.tv.foundation)
implementation(libs.androidx.tv.material)
implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.coil.kt.compose)


implementation(project(":core"))
implementation(project(":designsystem"))
Expand Down
7 changes: 4 additions & 3 deletions Jetcaster/tv-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@
android:name="android.software.leanback"
android:required="false" />

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:banner="@mipmap/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Jetcaster">
android:theme="@style/Theme.Jetcaster"
android:name=".JetCasterTvApp">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.jetcaster.tv

import android.app.Application
import com.example.jetcaster.core.data.di.Graph

class JetCasterTvApp : Application() {

override fun onCreate() {
super.onCreate()
Graph.provide(this)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.tv.material3.ExperimentalTvMaterial3Api
import androidx.tv.material3.Surface
import androidx.tv.material3.Text
import com.example.jetcaster.tv.ui.JetcasterApp
import com.example.jetcaster.tv.ui.theme.JetcasterTheme

class MainActivity : ComponentActivity() {
Expand All @@ -39,7 +40,7 @@ class MainActivity : ComponentActivity() {
modifier = Modifier.fillMaxSize(),
shape = RectangleShape
) {
Greeting("Android and World")
JetcasterApp()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.jetcaster.tv.model

import androidx.compose.runtime.Immutable
import com.example.jetcaster.core.data.database.model.Category

@Immutable
data class CategoryList(val member: List<Category>) : List<Category> by member
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.jetcaster.tv.model

import com.example.jetcaster.core.data.database.model.EpisodeToPodcast

data class EpisodeList(val member: List<EpisodeToPodcast>) : List<EpisodeToPodcast> by member
chikoski marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.jetcaster.tv.model

import androidx.compose.runtime.Immutable
import com.example.jetcaster.core.data.database.model.PodcastWithExtraInfo

@Immutable
data class PodcastList(
val member: List<PodcastWithExtraInfo>
) : List<PodcastWithExtraInfo> by member
Loading
Loading