Skip to content

Commit e5a7874

Browse files
committed
Merge branch 'master' into feature/composeBase
2 parents 8ff82cc + 1797a44 commit e5a7874

File tree

56 files changed

+300
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+300
-303
lines changed

app/build.gradle.kts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@file:Suppress("UnstableApiUsage")
22
android {
3+
namespace = "${Config.packageName}app"
4+
35
buildFeatures {
46
compose = true
57
}
@@ -8,15 +10,18 @@ android {
810
kotlinCompilerExtensionVersion = Versions.composeCompilerVersion
911
}
1012
}
11-
1213
dependencies {
1314
implementation(project(Dependencies.Module.feature_list_streams))
1415
implementation(project(Dependencies.Module.core_networking))
15-
implementation(project(Dependencies.Module.core_ui))
16+
implementation(project(Dependencies.Module.core_shared_ui))
1617
implementation(Dependencies.Koin.koin)
17-
Dependencies.Compose.list.forEach { implementation(it) }
1818
Dependencies.Kotlin.list.forEach { implementation(it) }
1919
Dependencies.Support.list.forEach { implementation(it) }
2020
Dependencies.UnitTest.list.forEach { testImplementation(it) }
2121
Dependencies.AndroidTest.list.forEach { androidTestImplementation(it) }
22+
23+
val composeBom = platform(Dependencies.Compose.composeBomVersion)
24+
implementation(composeBom)
25+
Dependencies.Compose.list.forEach { implementation(it) }
26+
implementation(Dependencies.lottie)
2227
}

app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
76
android:dataExtractionRules="@xml/data_extraction_rules"
87
android:fullBackupContent="@xml/backup_rules"
9-
android:icon="@mipmap/ic_launcher"
8+
android:icon="@mipmap/ic_netflix"
9+
android:roundIcon="@mipmap/ic_netflix_round"
1010
android:label="@string/app_name"
1111
android:supportsRtl="true"
12-
android:theme="@style/Theme.StreamPlayerApp"
13-
tools:targetApi="31"
14-
android:name=".CustomApplication">
12+
android:name="com.codandotv.streamplayerapp.CustomApplication">
13+
1514
<activity
16-
android:name=".MainActivity"
17-
android:exported="true">
15+
android:name="com.codandotv.streamplayerapp.MainActivity"
16+
android:exported="true"
17+
android:theme="@style/SplashScreenTheme">
1818
<intent-filter>
19-
<action android:name="android.intent.action.MAIN"/>
20-
<category android:name="android.intent.category.LAUNCHER"/>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
2122
</intent-filter>
2223
</activity>
2324
</application>
Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
package com.codandotv.streamplayerapp
22

3-
import androidx.appcompat.app.AppCompatActivity
43
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
6-
import androidx.compose.foundation.layout.Box
7-
import androidx.compose.foundation.layout.padding
8-
import androidx.compose.material3.ExperimentalMaterial3Api
9-
import androidx.compose.material3.Scaffold
10-
import androidx.compose.runtime.Composable
11-
import androidx.compose.ui.Modifier
12-
import com.codandotv.streamplayerapp.core_ui.theme.StreamPlayerTheme
13-
import com.codandotv.streamplayerapp.feature_list_streams.presentation.screens.ListStreamsScreen
6+
import com.codandotv.streamplayerapp.screens.SplashScreen
147

15-
class MainActivity : AppCompatActivity() {
8+
class MainActivity : ComponentActivity() {
169
override fun onCreate(savedInstanceState: Bundle?) {
1710
super.onCreate(savedInstanceState)
18-
setContent {
19-
StreamPlayerApp()
20-
}
21-
}
22-
}
23-
@OptIn(ExperimentalMaterial3Api::class)
24-
@Composable
25-
fun StreamPlayerApp() {
26-
StreamPlayerTheme {
27-
Scaffold { innerPadding ->
28-
Box(Modifier.padding(innerPadding)) {
29-
ListStreamsScreen()
30-
}
11+
12+
setContent{
13+
SplashScreen()
3114
}
3215
}
3316
}
17+
//@OptIn(ExperimentalMaterial3Api::class)
18+
//@Composable
19+
//fun StreamPlayerApp() {
20+
// StreamPlayerTheme {
21+
// Scaffold { innerPadding ->
22+
// Box(Modifier.padding(innerPadding)) {
23+
// ListStreamsScreen()
24+
// }
25+
// }
26+
// }
27+
//}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.codandotv.streamplayerapp.screens
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.layout.Box
5+
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.fillMaxSize
7+
import androidx.compose.runtime.Composable
8+
import androidx.compose.runtime.getValue
9+
import androidx.compose.ui.Alignment
10+
import androidx.compose.ui.Modifier
11+
import androidx.compose.ui.graphics.Color
12+
import androidx.compose.ui.tooling.preview.Preview
13+
import com.airbnb.lottie.compose.LottieAnimation
14+
import com.airbnb.lottie.compose.LottieCompositionSpec
15+
import com.airbnb.lottie.compose.animateLottieCompositionAsState
16+
import com.airbnb.lottie.compose.rememberLottieComposition
17+
import com.codandotv.streamplayerapp.core_shared_ui.R
18+
19+
@Composable
20+
fun SplashScreen() {
21+
Column(
22+
modifier = Modifier.fillMaxSize()
23+
) {
24+
Box(
25+
contentAlignment = Alignment.Center,
26+
modifier = Modifier
27+
.fillMaxSize()
28+
.background(Color.Black)
29+
) {
30+
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.logo))
31+
val logoAnimationState = animateLottieCompositionAsState(composition = composition)
32+
LottieAnimation(composition = composition, progress = { logoAnimationState.progress })
33+
if (logoAnimationState.isAtEnd && logoAnimationState.isPlaying) {
34+
println("faz alguma coisa")
35+
}
36+
}
37+
}
38+
}
39+
40+
@Composable
41+
@Preview
42+
fun SplashScreenPreview() {
43+
SplashScreen()
44+
}

app/src/main/res/drawable-v24/ic_launcher_foreground.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

app/src/main/res/drawable/ic_launcher_background.xml

Lines changed: 0 additions & 170 deletions
This file was deleted.

app/src/main/res/layout/activity_main.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)