|
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
|
|
|
import androidx.activity.ComponentActivity
|
|
|
|
import androidx.activity.ComponentActivity
|
|
|
|
import androidx.activity.compose.setContent
|
|
|
|
import androidx.activity.compose.setContent
|
|
|
|
import androidx.activity.enableEdgeToEdge
|
|
|
|
import androidx.activity.enableEdgeToEdge
|
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
import androidx.compose.material3.Scaffold
|
|
|
|
import androidx.compose.material3.Scaffold
|
|
|
@ -11,6 +12,8 @@ import androidx.compose.material3.Text
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
|
|
|
|
|
import com.example.what_the_fantasy.model.Quote
|
|
|
|
|
|
|
|
import com.example.what_the_fantasy.model.SrcType
|
|
|
|
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
|
|
|
|
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
|
|
|
|
|
|
|
|
|
|
|
|
class MainActivity : ComponentActivity() {
|
|
|
|
class MainActivity : ComponentActivity() {
|
|
|
@ -19,11 +22,16 @@ class MainActivity : ComponentActivity() {
|
|
|
|
enableEdgeToEdge()
|
|
|
|
enableEdgeToEdge()
|
|
|
|
setContent {
|
|
|
|
setContent {
|
|
|
|
What_The_FantasyTheme {
|
|
|
|
What_The_FantasyTheme {
|
|
|
|
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
|
|
|
Column {
|
|
|
|
Title(
|
|
|
|
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
|
|
|
|
title = "What The Fantasy",
|
|
|
|
Title(
|
|
|
|
modifier = Modifier.padding(innerPadding)
|
|
|
|
title = "What The Fantasy",
|
|
|
|
)
|
|
|
|
modifier = Modifier.padding(innerPadding)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
Quote(
|
|
|
|
|
|
|
|
q = Quote(1,"Test n°1","test","null","test",100,"fr",SrcType.Movie)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -38,6 +46,18 @@ fun Title(title: String, modifier: Modifier = Modifier) {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
|
|
|
fun Quote(q: Quote){
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
text = q.id.toString()
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
text = q.content
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Preview(showBackground = true)
|
|
|
|
@Preview(showBackground = true)
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
fun GreetingPreview() {
|
|
|
|
fun GreetingPreview() {
|
|
|
|