From 0a2691eccb70d25bcb197180d1989ff328ab028c Mon Sep 17 00:00:00 2001 From: "kevin.modejar" Date: Thu, 6 Feb 2025 12:02:39 +0100 Subject: [PATCH 1/3] Class creation : Quote, User,Character, Source, TypeEnum, Question --- .../example/what_the_fantasy/MainActivity.kt | 30 +++++++++++++++---- .../what_the_fantasy/model/Character.kt | 10 +++++++ .../what_the_fantasy/model/Question.kt | 14 +++++++++ .../example/what_the_fantasy/model/Quote.kt | 14 +++++++++ .../example/what_the_fantasy/model/Source.kt | 11 +++++++ .../example/what_the_fantasy/model/SrcType.kt | 7 +++++ .../example/what_the_fantasy/model/User.kt | 12 ++++++++ .../app/src/main/res/values-fr/strings.xml | 7 +++++ .../app/src/main/res/values/strings.xml | 5 +++- 9 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Character.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Question.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Quote.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Source.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/SrcType.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/User.kt create mode 100644 What_The_Fantasy/app/src/main/res/values-fr/strings.xml diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt index 8414a52..bcb135d 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt @@ -4,6 +4,7 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material3.Scaffold @@ -11,6 +12,8 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier 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 class MainActivity : ComponentActivity() { @@ -19,11 +22,16 @@ class MainActivity : ComponentActivity() { enableEdgeToEdge() setContent { What_The_FantasyTheme { - Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> - Title( - title = "What The Fantasy", - modifier = Modifier.padding(innerPadding) - ) + Column { + Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> + Title( + 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) @Composable fun GreetingPreview() { diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Character.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Character.kt new file mode 100644 index 0000000..54a066c --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Character.kt @@ -0,0 +1,10 @@ +package com.example.what_the_fantasy.model + +class Character( + val id:Int, + val character:String, + val imgPath: String +) +{ + +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Question.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Question.kt new file mode 100644 index 0000000..e31407a --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Question.kt @@ -0,0 +1,14 @@ +package com.example.what_the_fantasy.model + +class Question( + val id:Int, + val question:String, + val ansA:String, + val ansB:String, + val ansC:String, + val ansD:String, + val correctAns: String, +) +{ + +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Quote.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Quote.kt new file mode 100644 index 0000000..a08ca3a --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Quote.kt @@ -0,0 +1,14 @@ +package com.example.what_the_fantasy.model + +class Quote( + val id:Int, + val content:String, + val character:String, + val imagePath:String, + val titleSrc:String, + var likes:Int, + val lang:String, + val type:SrcType) +{ + +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Source.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Source.kt new file mode 100644 index 0000000..39c4173 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/Source.kt @@ -0,0 +1,11 @@ +package com.example.what_the_fantasy.model + +class Source( + val id:Int, + val title:String, + val date:String, + val type:SrcType +) +{ + +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/SrcType.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/SrcType.kt new file mode 100644 index 0000000..8f6af55 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/SrcType.kt @@ -0,0 +1,7 @@ +package com.example.what_the_fantasy.model + +enum class SrcType (val value: String) { + Movie("@string/movie"), + VideoGame("@string/videoGame"), + Series("@string/series"), +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/User.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/User.kt new file mode 100644 index 0000000..1366c29 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/model/User.kt @@ -0,0 +1,12 @@ +package com.example.what_the_fantasy.model + +class User( + val id:Int, + var username:String, + var email:String, + var date:String, + val imagePath:String, +) +{ + +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/res/values-fr/strings.xml b/What_The_Fantasy/app/src/main/res/values-fr/strings.xml new file mode 100644 index 0000000..cfb65f0 --- /dev/null +++ b/What_The_Fantasy/app/src/main/res/values-fr/strings.xml @@ -0,0 +1,7 @@ + + + What The Fantasy + Film + Jeu Vidéo + Série + \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/res/values/strings.xml b/What_The_Fantasy/app/src/main/res/values/strings.xml index 180dd4e..75ba845 100644 --- a/What_The_Fantasy/app/src/main/res/values/strings.xml +++ b/What_The_Fantasy/app/src/main/res/values/strings.xml @@ -1,3 +1,6 @@ - What_The_Fantasy + What The Fantasy + Movie + Video Game + Series \ No newline at end of file From 6e495991d4245a24997ea46d7d588c66f209c7ce Mon Sep 17 00:00:00 2001 From: "maxime.rocher" Date: Tue, 11 Feb 2025 08:52:33 +0100 Subject: [PATCH 2/3] =?UTF-8?q?R=C3=A9organisation=20selon=20MVVM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/what_the_fantasy/AccueilPage.kt | 6 ------ .../example/what_the_fantasy/FavoritePage.kt | 11 ----------- .../com/example/what_the_fantasy/LoginPage.kt | 13 ------------- .../example/what_the_fantasy/MainActivity.kt | 9 +-------- .../com/example/what_the_fantasy/ProfilPage.kt | 17 ----------------- .../com/example/what_the_fantasy/QuizPage.kt | 11 ----------- .../com/example/what_the_fantasy/QuotePage.kt | 11 ----------- .../com/example/what_the_fantasy/SearchPage.kt | 11 ----------- .../com/example/what_the_fantasy/SignUpPage.kt | 11 ----------- .../example/what_the_fantasy/SubmitQuotePage.kt | 11 ----------- .../data/{ => local}/CharacterStub.kt | 4 +++- .../data/{ => local}/ImageStub.kt | 4 +++- .../data/{ => local}/QuoteStub.kt | 4 +++- .../data/{ => local}/SourceStub.kt | 4 +++- .../data/{ => model}/Character.kt | 2 +- .../what_the_fantasy/data/{ => model}/Image.kt | 2 +- .../what_the_fantasy/data/{ => model}/Quote.kt | 2 +- .../what_the_fantasy/data/{ => model}/Source.kt | 2 +- .../what_the_fantasy/ui/components/NavBar.kt | 4 ++++ .../what_the_fantasy/ui/screens/AccueilPage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/FavoritePage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/LoginPage.kt | 7 +++++++ .../what_the_fantasy/ui/screens/ProfilPage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/QuizPage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/QuotePage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/SearchPage.kt | 6 ++++++ .../what_the_fantasy/ui/screens/SignUpPage.kt | 6 ++++++ .../ui/screens/SubmitQuotePage.kt | 6 ++++++ 28 files changed, 76 insertions(+), 118 deletions(-) delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/AccueilPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/FavoritePage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/LoginPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ProfilPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuizPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuotePage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SearchPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SignUpPage.kt delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SubmitQuotePage.kt rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => local}/CharacterStub.kt (89%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => local}/ImageStub.kt (94%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => local}/QuoteStub.kt (97%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => local}/SourceStub.kt (79%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => model}/Character.kt (62%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => model}/Image.kt (54%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => model}/Quote.kt (82%) rename What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/{ => model}/Source.kt (62%) create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/NavBar.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/AccueilPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/LoginPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/ProfilPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuizPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SearchPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SignUpPage.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SubmitQuotePage.kt diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/AccueilPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/AccueilPage.kt deleted file mode 100644 index 31eb178..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/AccueilPage.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.what_the_fantasy - -import androidx.compose.runtime.Composable - -@Composable -fun AccueilPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/FavoritePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/FavoritePage.kt deleted file mode 100644 index aa2fb2b..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/FavoritePage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun FavoritePage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/LoginPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/LoginPage.kt deleted file mode 100644 index 6a6c77a..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/LoginPage.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun LoginPage() { -} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt index 016cadb..ec9c64b 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/MainActivity.kt @@ -4,15 +4,8 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.Preview import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme -import com.example.what_the_fantasy.LoginPage +import com.example.what_the_fantasy.ui.screens.LoginPage class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ProfilPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ProfilPage.kt deleted file mode 100644 index ee4af3d..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ProfilPage.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.Preview -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun ProfilPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuizPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuizPage.kt deleted file mode 100644 index 27e558f..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuizPage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun QuizPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuotePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuotePage.kt deleted file mode 100644 index 7ac8b66..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/QuotePage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun QuotePage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SearchPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SearchPage.kt deleted file mode 100644 index af89024..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SearchPage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun SearchPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SignUpPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SignUpPage.kt deleted file mode 100644 index 63b2819..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SignUpPage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun SignUpPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SubmitQuotePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SubmitQuotePage.kt deleted file mode 100644 index 7230412..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/SubmitQuotePage.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.what_the_fantasy - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.runtime.Composable -import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme - -@Composable -fun SubmitQuotePage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/CharacterStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt similarity index 89% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/CharacterStub.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt index 2626e54..9166ac1 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/CharacterStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt @@ -1,4 +1,6 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.Character object CharacterStub { private val aragorn = Character( diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/ImageStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt similarity index 94% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/ImageStub.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt index db3bbfe..616e7e9 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/ImageStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt @@ -1,4 +1,6 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.Image object ImageStub { private val imageAragorn = Image( diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/QuoteStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt similarity index 97% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/QuoteStub.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt index 4fab1ac..fb90580 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/QuoteStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt @@ -1,4 +1,6 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.Quote object QuoteStub { private val quoteAragorn1 = Quote( diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/SourceStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt similarity index 79% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/SourceStub.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt index eec82b6..e25820a 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/SourceStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt @@ -1,4 +1,6 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.Source object SourceStub { private val sourceLOTR = Source( diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Character.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Character.kt similarity index 62% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Character.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Character.kt index 324f060..68f8b12 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Character.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Character.kt @@ -1,4 +1,4 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.model data class Character ( val id: Int, diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Image.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Image.kt similarity index 54% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Image.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Image.kt index d927a48..1068afa 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Image.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Image.kt @@ -1,4 +1,4 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.model data class Image( val id: Int, diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Quote.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Quote.kt similarity index 82% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Quote.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Quote.kt index b0c8069..b95a575 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Quote.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Quote.kt @@ -1,4 +1,4 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.model data class Quote ( val id: Int, diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Source.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Source.kt similarity index 62% rename from What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Source.kt rename to What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Source.kt index db51b32..bfa40e9 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/Source.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/model/Source.kt @@ -1,4 +1,4 @@ -package com.example.what_the_fantasy.data +package com.example.what_the_fantasy.data.model data class Source ( val id: Int, diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/NavBar.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/NavBar.kt new file mode 100644 index 0000000..dedbd00 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/NavBar.kt @@ -0,0 +1,4 @@ +package com.example.what_the_fantasy.ui.components + +class NavBar { +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/AccueilPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/AccueilPage.kt new file mode 100644 index 0000000..8fd4c97 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/AccueilPage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun AccueilPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt new file mode 100644 index 0000000..72c2e72 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/FavoritePage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun FavoritePage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/LoginPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/LoginPage.kt new file mode 100644 index 0000000..40b2f04 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/LoginPage.kt @@ -0,0 +1,7 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun LoginPage() { +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/ProfilPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/ProfilPage.kt new file mode 100644 index 0000000..a80fed3 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/ProfilPage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun ProfilPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuizPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuizPage.kt new file mode 100644 index 0000000..bc7854f --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuizPage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun QuizPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt new file mode 100644 index 0000000..cfb1d2f --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun QuotePage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SearchPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SearchPage.kt new file mode 100644 index 0000000..9b8d6ac --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SearchPage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun SearchPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SignUpPage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SignUpPage.kt new file mode 100644 index 0000000..ce60fcf --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SignUpPage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun SignUpPage() {} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SubmitQuotePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SubmitQuotePage.kt new file mode 100644 index 0000000..0b88b35 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/SubmitQuotePage.kt @@ -0,0 +1,6 @@ +package com.example.what_the_fantasy.ui.screens + +import androidx.compose.runtime.Composable + +@Composable +fun SubmitQuotePage() {} \ No newline at end of file From 8eec64748cd7ede53a21956a1d76b89b1d5bc93f Mon Sep 17 00:00:00 2001 From: "kevin.modejar" Date: Tue, 11 Feb 2025 11:08:27 +0100 Subject: [PATCH 3/3] =?UTF-8?q?fin=20mod=C3=A8le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/local/CharacterStub.kt | 142 ++++-- .../what_the_fantasy/data/local/ImageStub.kt | 112 +++-- .../data/local/QuestionStub.kt | 100 +++++ .../what_the_fantasy/data/local/QuoteStub.kt | 424 ++++++++---------- .../what_the_fantasy/data/local/SourceStub.kt | 90 +++- .../what_the_fantasy/data/local/UserStub.kt | 80 ++++ 6 files changed, 603 insertions(+), 345 deletions(-) create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuestionStub.kt create mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/UserStub.kt diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt index 9166ac1..5079f6b 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/CharacterStub.kt @@ -3,63 +3,109 @@ package com.example.what_the_fantasy.data.local import com.example.what_the_fantasy.data.model.Character object CharacterStub { - private val aragorn = Character( - 1, - "Aragorn", - 1 + val aragorn = Character( + id = 1, + name = "Aragorn", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg" ) - - private val gandalf = Character( - 2, - "Gandalf", - 2 + val legolas = Character( + id = 2, + name = "Legolas", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg" ) - - private val legolas = Character( - 3, - "Legolas", - 3 + val gandalf = Character( + id = 3, + name = "Gandalf", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg" ) - - private val geralt = Character( - 4, - "Geralt de Riv", - 4 + val frodoBaggins = Character( + id = 4, + name = "Frodo Baggins", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg" ) - - private val yennefer = Character( - 5, - "Yennefer de Vengerberg", - 5 + val gimli = Character( + id = 5, + name = "Gimli", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg" ) - - private val ciri = Character( - 6, - "Cirilla Fiona Elen Riannon", - 6 + val galadriel = Character( + id = 6, + name = "Galadriel", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg" ) - - private val jonSnow = Character( - 7, - "Jon Snow", - 7 + val boromir = Character( + id = 7, + name = "Boromir", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg" ) - - private val daenerys = Character( - 8, - "Daenerys Targaryen", - 8 + val eowyn = Character( + id = 8, + name = "Éowyn", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg" ) - - private val tywin = Character( - 9, - "Tywin Lannister", - 9 + val saruman = Character( + id = 9, + name = "Saruman", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg" + ) + val faramir = Character( + id = 10, + name = "Faramir", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg" + ) + val theoden = Character( + id = 11, + name = "Théoden", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-roi-fantaisie_1045-195.jpg?size=338&ext=jpg" + ) + val merry = Character( + id = 12, + name = "Merry", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-196.jpg?size=338&ext=jpg" + ) + val pippin = Character( + id = 13, + name = "Pippin", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-197.jpg?size=338&ext=jpg" + ) + val samwiseGamgee = Character( + id = 14, + name = "Samwise Gamgee", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-198.jpg?size=338&ext=jpg" + ) + val elrond = Character( + id = 15, + name = "Elrond", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-homme-fantaisie_1045-199.jpg?size=338&ext=jpg" + ) + val arwen = Character( + id = 16, + name = "Arwen", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-200.jpg?size=338&ext=jpg" + ) + val treebeard = Character( + id = 17, + name = "Treebeard", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-ent-fantaisie_1045-201.jpg?size=338&ext=jpg" + ) + val gollum = Character( + id = 18, + name = "Gollum", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-creature-fantaisie_1045-202.jpg?size=338&ext=jpg" + ) + val nazgul = Character( + id = 19, + name = "Nazgûl", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-spectre-fantaisie_1045-203.jpg?size=338&ext=jpg" + ) + val shelob = Character( + id = 20, + name = "Shelob", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-araignee-fantaisie_1045-204.jpg?size=338&ext=jpg" ) - private val elric = Character( - 10, - "Elric de Melniboné", - 10 + val allCharacters: List = listOf( + aragorn, legolas, gandalf, frodoBaggins, gimli, galadriel, boromir, eowyn, saruman, faramir, + theoden, merry, pippin, samwiseGamgee, elrond, arwen, treebeard, gollum, nazgul, shelob ) } \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt index 616e7e9..2c2070f 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/ImageStub.kt @@ -3,53 +3,89 @@ package com.example.what_the_fantasy.data.local import com.example.what_the_fantasy.data.model.Image object ImageStub { - private val imageAragorn = Image( - 1, - "https://static.posters.cz/image/750/art-photo/aragorn-i142865.jpg" + val aragornImage = Image( + id = 1, + url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg" ) - - private val imageGandalf = Image( - 2, - "https://static.wikia.nocookie.net/seigneur-des-anneaux/images/a/ad/Gandalf_Db.jpg/revision/latest/thumbnail/width/360/height/360?cb=20210919182300&path-prefix=fr" + val legolasImage = Image( + id = 2, + url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg" ) - - private val imageLegolas = Image( - 3, - "https://storage.canalblog.com/81/50/1203904/92832500_o.jpeg" + val gandalfImage = Image( + id = 3, + url = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg" ) - - private val imageGeralt = Image( - 4, - "https://www.journaldugeek.com/app/uploads/2024/05/the-witcher-3-mod.jpg" + val frodoBagginsImage = Image( + id = 4, + url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg" ) - - private val imageYennefer = Image( - 5, - "https://www.parismatch.com/lmnr/var/pm/public/media/image/2022/03/02/01/The-Witcher-qui-est-l-actrice-Anya-Chalotra.jpg?VersionId=kkBQlX3KHlm1X7sTcGJGwJa3UREFwYFd" + val gimliImage = Image( + id = 5, + url = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg" ) - - private val imageCiri = Image( - 6, - "https://www.gamelove.com/sites/www.gamelove.com/files/Guide/the_witcher_3/ciri/guide-the-witcher-3-personnages-ciri-001.jpg²" + val galadrielImage = Image( + id = 6, + url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg" ) - - private val imageJonSnow = Image( - 7, - "https://i0.wp.com/imagesociale.fr/wp-content/uploads/got_jonsnow.jpg?ssl=1" + val boromirImage = Image( + id = 7, + url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg" ) - - private val imageDaenerys = Image( - 8, - "https://www.leparisien.fr/resizer/VgcUVs3QvEeH9RP-T5l0XF2tYQQ=/932x582/cloudfront-eu-central-1.images.arcpublishing.com/leparisien/FXGTC7Z3TDOHOGXQI54NDKHQHI.jpg" + val eowynImage = Image( + id = 8, + url = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg" ) - - private val imageTywin = Image( - 9, - "https://media.vanityfair.fr/photos/60df271ce629ebff31500ece/1:1/w_652,h_652,c_limit/vf_tywin_lannister_4413.jpeg" + val sarumanImage = Image( + id = 9, + url = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg" + ) + val faramirImage = Image( + id = 10, + url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg" + ) + val theodenImage = Image( + id = 11, + url = "https://img.freepik.com/vecteurs-libre/personnage-roi-fantaisie_1045-195.jpg?size=338&ext=jpg" + ) + val merryImage = Image( + id = 12, + url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-196.jpg?size=338&ext=jpg" + ) + val pippinImage = Image( + id = 13, + url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-197.jpg?size=338&ext=jpg" + ) + val samwiseGamgeeImage = Image( + id = 14, + url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-198.jpg?size=338&ext=jpg" + ) + val elrondImage = Image( + id = 15, + url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-homme-fantaisie_1045-199.jpg?size=338&ext=jpg" + ) + val arwenImage = Image( + id = 16, + url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-200.jpg?size=338&ext=jpg" + ) + val treebeardImage = Image( + id = 17, + url = "https://img.freepik.com/vecteurs-libre/personnage-ent-fantaisie_1045-201.jpg?size=338&ext=jpg" + ) + val gollumImage = Image( + id = 18, + url = "https://img.freepik.com/vecteurs-libre/personnage-creature-fantaisie_1045-202.jpg?size=338&ext=jpg" + ) + val nazgulImage = Image( + id = 19, + url = "https://img.freepik.com/vecteurs-libre/personnage-spectre-fantaisie_1045-203.jpg?size=338&ext=jpg" + ) + val shelobImage = Image( + id = 20, + url = "https://img.freepik.com/vecteurs-libre/personnage-araignee-fantaisie_1045-204.jpg?size=338&ext=jpg" ) - private val imageElric = Image( - 10, - "https://cdna.artstation.com/p/assets/images/images/036/577/590/large/maena-paillet-elric11-web.jpg?1618043196" + val allImages: List = listOf( + aragornImage, legolasImage, gandalfImage, frodoBagginsImage, gimliImage, galadrielImage, boromirImage, eowynImage, sarumanImage, faramirImage, + theodenImage, merryImage, pippinImage, samwiseGamgeeImage, elrondImage, arwenImage, treebeardImage, gollumImage, nazgulImage, shelobImage ) } \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuestionStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuestionStub.kt new file mode 100644 index 0000000..19833ec --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuestionStub.kt @@ -0,0 +1,100 @@ +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.Question + +object QuestionStub { + val question1 = Question( + id = 1, + question = "Quel est le nom du roi des elfes dans 'Le Seigneur des Anneaux' ?", + ansA = "Elrond", + ansB = "Legolas", + ansC = "Thranduil", + ansD = "Galadriel", + correctAns = "C" + ) + val question2 = Question( + id = 2, + question = "Qui est l'auteur de la série 'Harry Potter' ?", + ansA = "J.K. Rowling", + ansB = "J.R.R. Tolkien", + ansC = "C.S. Lewis", + ansD = "George R.R. Martin", + correctAns = "A" + ) + val question3 = Question( + id = 3, + question = "Dans 'Star Wars', qui est le père de Luke Skywalker ?", + ansA = "Obi-Wan Kenobi", + ansB = "Darth Vader", + ansC = "Yoda", + ansD = "Han Solo", + correctAns = "B" + ) + val question4 = Question( + id = 4, + question = "Quel est le nom de l'épée de Bilbo Baggins ?", + ansA = "Glamdring", + ansB = "Sting", + ansC = "Andúril", + ansD = "Orcrist", + correctAns = "B" + ) + val question5 = Question( + id = 5, + question = "Dans 'Game of Thrones', quel est le nom de la capitale des Sept Couronnes ?", + ansA = "Winterfell", + ansB = "King's Landing", + ansC = "Dorne", + ansD = "Casterly Rock", + correctAns = "B" + ) + val question6 = Question( + id = 6, + question = "Quel est le nom du dragon de Daenerys Targaryen dans 'Game of Thrones' ?", + ansA = "Drogon", + ansB = "Viserion", + ansC = "Rhaegal", + ansD = "Balerion", + correctAns = "A" + ) + val question7 = Question( + id = 7, + question = "Qui est l'auteur de 'Le Hobbit' ?", + ansA = "J.R.R. Tolkien", + ansB = "C.S. Lewis", + ansC = "George R.R. Martin", + ansD = "J.K. Rowling", + correctAns = "A" + ) + val question8 = Question( + id = 8, + question = "Dans 'Le Seigneur des Anneaux', qui est le porteur de l'Anneau Unique ?", + ansA = "Frodo Baggins", + ansB = "Samwise Gamgee", + ansC = "Aragorn", + ansD = "Gandalf", + correctAns = "A" + ) + val question9 = Question( + id = 9, + question = "Quel est le nom du royaume gouverné par Théoden dans 'Le Seigneur des Anneaux' ?", + ansA = "Gondor", + ansB = "Rohan", + ansC = "Mordor", + ansD = "Lothlórien", + correctAns = "B" + ) + val question10 = Question( + id = 10, + question = "Dans 'Harry Potter', quel est le nom de l'école de magie fréquentée par Harry ?", + ansA = "Poudlard", + ansB = "Beauxbâtons", + ansC = "Durmstrang", + ansD = "Ilvermorny", + correctAns = "A" + ) + + val allQuestions: List = listOf( + question1, question2, question3, question4, question5, question6, question7, question8, question9, question10 + ) +} \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt index fb90580..cc321e5 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/QuoteStub.kt @@ -2,245 +2,191 @@ package com.example.what_the_fantasy.data.local import com.example.what_the_fantasy.data.model.Quote -object QuoteStub { - private val quoteAragorn1 = Quote( - 1, - "Un jour viendra où le courage des hommes faillira… mais ce jour n’est pas arrivé !", - 1000, - "fr", - true, - null, - 1, - 1, - 1 - ) - - private val quoteAragorn2 = Quote( - 2, - "Je ne suis pas un homme qui prend aisément la fuite.", - 900, - "fr", - true, - null, - 1, - 1, - 1 - ) - - private val quoteGandalf1 = Quote( - 3, - "Un magicien n'est jamais en retard, ni en avance d'ailleurs. Il arrive précisément à l'heure prévue.", - 1500, - "fr", - true, - null, - 2, - 1, - 1 - ) - - private val quoteGandalf2 = Quote( - 4, - "Fuyez, pauvres fous !", - 2000, - "fr", - true, - null, - 2, - 1, - 1 - ) - - private val quoteLegolas1 = Quote( - 5, - "Ils emmènent les Hobbits à Isengard !", - 1200, - "fr", - true, - null, - 3, - 1, - 1 - ) - - private val quoteLegolas2 = Quote( - 6, - "Un soleil rouge se lève… Beaucoup de sang a dû couler cette nuit.", - 1100, - "fr", - true, - null, - 3, - 1, - 1 - ) - - private val quoteGeralt1 = Quote( - 7, - "Les mauvaises choses arrivent à ceux qui les méritent.", - 1300, - "fr", - true, - null, - 4, - 2, - 1 - ) - - private val quoteGeralt2 = Quote( - 8, - "Si je devais choisir entre un mal et un autre, alors je préfère ne pas choisir du tout.", - 1700, - "fr", - true, - null, - 4, - 2, - 1 - ) - - private val quoteYennefer1 = Quote( - 9, - "La magie, c’est le chaos, l’art et la science combinés.", - 1400, - "fr", - true, - null, - 5, - 2, - 1 - ) - - private val quoteYennefer2 = Quote( - 10, - "Je suis Yennefer de Vengerberg. Je ne supplie jamais.", - 1600, - "fr", - true, - null, - 5, - 2, - 1 - ) - private val quoteCiri1 = Quote( - 11, - "Je suis une enfant de la destinée.", - 1250, - "fr", - true, - null, - 6, - 2, - 1 - ) - - private val quoteCiri2 = Quote( - 12, - "L’avenir n’est jamais écrit.", - 1350, - "fr", - true, - null, - 6, - 2, - 1 - ) - - private val quoteJonSnow1 = Quote( - 13, - "L’hiver vient.", - 1800, - "fr", - true, - null, - 7, - 3, - 1 - ) - - private val quoteJonSnow2 = Quote( - 14, - "L’amour est la mort du devoir.", - 1900, - "fr", - true, - null, - 7, - 3, - 1 - ) - - private val quoteDaenerys1 = Quote( - 15, - "Je ne suis pas une femme ordinaire. Mes rêves se réalisent.", - 1700, - "fr", - true, - null, - 8, - 3, - 1 - ) - - private val quoteDaenerys2 = Quote( - 16, - "Dracarys !", - 2500, - "fr", - true, - null, - 8, - 3, - 1 - ) - - private val quoteTywin1 = Quote( - 17, - "Un lion ne se soucie pas de l’opinion des moutons.", - 1600, - "fr", - true, - null, - 9, - 3, - 1 - ) - - private val quoteTywin2 = Quote( - 18, - "N’importe quel imbécile peut gagner une bataille, mais il faut un roi pour gagner une guerre.", - 1700, - "fr", - true, - null, - 9, - 3, - 1 - ) - - private val quoteElric1 = Quote( - 19, - "Le destin est une chose étrange, il nous fait souvent croiser des chemins inattendus.", - 1400, - "fr", - true, - null, - 10, - 4, - 1 - ) - - private val quoteElric2 = Quote( - 20, - "Stormbringer ! Lame maudite, mon seul véritable compagnon.", - 1500, - "fr", - true, - null, - 10, - 4, - 1 +object QuoteStub { + val quote1 = Quote( + id = 1, + content = "All we have to decide is what to do with the time that is given us.", + likes = 466, + language = "en", + character = CharacterStub.gandalf.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.gandalf.imgUrl + ) + val quote2 = Quote( + id = 2, + content = "A wizard is never late, nor is he early, he arrives precisely when he means to.", + likes = 467, + language = "en", + character = CharacterStub.gandalf.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.gandalf.imgUrl + ) + val quote3 = Quote( + id = 3, + content = "Even the smallest person can change the course of the future.", + likes = 466, + language = "en", + character = CharacterStub.galadriel.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.galadriel.imgUrl + ) + val quote4 = Quote( + id = 4, + content = "I would rather share one lifetime with you than face all the ages of this world alone.", + likes = 120, + language = "en", + character = CharacterStub.arwen.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.arwen.imgUrl + ) + val quote5 = Quote( + id = 5, + content = "Faithless is he that says farewell when the road darkens.", + likes = 150, + language = "en", + character = CharacterStub.gimli.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.gimli.imgUrl + ) + val quote6 = Quote( + id = 6, + content = "It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.", + likes = 200, + language = "en", + character = CharacterStub.frodoBaggins.name, + source = "The Lord of the Rings: The Fellowship of the Ring", + imgUrl = CharacterStub.frodoBaggins.imgUrl + ) + val quote7 = Quote( + id = 7, + content = "I am no man.", + likes = 300, + language = "en", + character = CharacterStub.eowyn.name, + source = "The Lord of the Rings: The Return of the King", + imgUrl = CharacterStub.eowyn.imgUrl + ) + val quote8 = Quote( + id = 8, + content = "The world is changed. I feel it in the water. I feel it in the earth. I smell it in the air.", + likes = 400, + language = "en", + character = CharacterStub.treebeard.name, + source = "The Lord of the Rings: The Two Towers", + imgUrl = CharacterStub.treebeard.imgUrl + ) + val quote9 = Quote( + id = 9, + content = "We wants it, we needs it. Must have the precious.", + likes = 500, + language = "en", + character = CharacterStub.gollum.name, + source = "The Lord of the Rings: The Two Towers", + imgUrl = CharacterStub.gollum.imgUrl + ) + val quote10 = Quote( + id = 10, + content = "The board is set, the pieces are moving. We come to it at last, the great battle of our time.", + likes = 600, + language = "en", + character = CharacterStub.gandalf.name, + source = "The Lord of the Rings: The Return of the King", + imgUrl = CharacterStub.gandalf.imgUrl + ) + val quote11 = Quote( + id = 11, + content = "Un grand pouvoir implique de grandes responsabilités.", + likes = 466, + language = "fr", + character = CharacterStub.aragorn.name, + source = "Spider-Man", + imgUrl = CharacterStub.aragorn.imgUrl + ) + val quote12 = Quote( + id = 12, + content = "Que la Force soit avec toi.", + likes = 467, + language = "fr", + character = CharacterStub.legolas.name, + source = "Star Wars", + imgUrl = CharacterStub.legolas.imgUrl + ) + val quote13 = Quote( + id = 13, + content = "La magie est partout. Il suffit de savoir où la trouver.", + likes = 466, + language = "fr", + character = CharacterStub.gandalf.name, + source = "Harry Potter", + imgUrl = CharacterStub.gandalf.imgUrl + ) + val quote14 = Quote( + id = 14, + content = "Le monde est plein de choses magiques, patientant que nos sens s'aiguisent.", + likes = 120, + language = "fr", + character = CharacterStub.frodoBaggins.name, + source = "Le Seigneur des Anneaux", + imgUrl = CharacterStub.frodoBaggins.imgUrl + ) + val quote15 = Quote( + id = 15, + content = "La peur mène à la colère, la colère mène à la haine, la haine mène à la souffrance.", + likes = 150, + language = "fr", + character = CharacterStub.gimli.name, + source = "Star Wars", + imgUrl = CharacterStub.gimli.imgUrl + ) + val quote16 = Quote( + id = 16, + content = "La vie est une aventure audacieuse ou rien du tout.", + likes = 200, + language = "fr", + character = CharacterStub.galadriel.name, + source = "Helen Keller", + imgUrl = CharacterStub.galadriel.imgUrl + ) + val quote17 = Quote( + id = 17, + content = "Le courage n'est pas l'absence de peur, mais la capacité de vaincre ce qui fait peur.", + likes = 300, + language = "fr", + character = CharacterStub.boromir.name, + source = "Nelson Mandela", + imgUrl = CharacterStub.boromir.imgUrl + ) + val quote18 = Quote( + id = 18, + content = "La folie, c'est de faire toujours la même chose et de s'attendre à un résultat différent.", + likes = 400, + language = "fr", + character = CharacterStub.eowyn.name, + source = "Albert Einstein", + imgUrl = CharacterStub.eowyn.imgUrl + ) + val quote19 = Quote( + id = 19, + content = "Le bonheur n'est pas quelque chose de tout fait. Il vient de vos propres actions.", + likes = 500, + language = "fr", + character = CharacterStub.saruman.name, + source = "Dalaï Lama", + imgUrl = CharacterStub.saruman.imgUrl + ) + val quote20 = Quote( + id = 20, + content = "La vie est un mystère qu'il faut vivre, et non un problème à résoudre.", + likes = 600, + language = "fr", + character = CharacterStub.samwiseGamgee.name, + source = "Gandhi", + imgUrl = CharacterStub.samwiseGamgee.imgUrl + ) + + val allQuotes: List = listOf( + quote1, quote2, quote3, quote4, quote5, quote6, quote7, quote8, quote9, quote10, + quote11, quote12, quote13, quote14, quote15, quote16, quote17, quote18, quote19, quote20 ) - } \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt index e25820a..117a2f3 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/SourceStub.kt @@ -1,30 +1,80 @@ package com.example.what_the_fantasy.data.local import com.example.what_the_fantasy.data.model.Source +import com.example.what_the_fantasy.data.model.SrcType object SourceStub { - private val sourceLOTR = Source( - 1, - "Le Seigneur des Anneaux", - 1954 + val theLordOfTheRingsMovie = Source( + id = 1, + title = "The Lord of the Rings: The Fellowship of the Ring", + dateS = 2001, + type = SrcType.Movie ) - - private val sourceWitcher = Source( - 2, - "The Witcher", - 1990 + val theTwoTowersMovie = Source( + id = 2, + title = "The Lord of the Rings: The Two Towers", + dateS = 2002, + type = SrcType.Movie ) - - private val sourceGOT = Source( - 3, - "Game of Thrones", - 1996 + val theReturnOfTheKingMovie = Source( + id = 3, + title = "The Lord of the Rings: The Return of the King", + dateS = 2003, + type = SrcType.Movie ) - - private val sourceElric = Source( - 4, - "Elric de Melniboné", - 1972 + val harryPotterSeries = Source( + id = 4, + title = "Harry Potter", + dateS = 1997, + type = SrcType.Series + ) + val starWarsMovie = Source( + id = 5, + title = "Star Wars", + dateS = 1977, + type = SrcType.Movie + ) + val spiderManMovie = Source( + id = 6, + title = "Spider-Man", + dateS = 2002, + type = SrcType.Movie + ) + val theWitcherVideoGame = Source( + id = 7, + title = "The Witcher", + dateS = 2007, + type = SrcType.VideoGame + ) + val theElderScrollsVideoGame = Source( + id = 8, + title = "The Elder Scrolls", + dateS = 1994, + type = SrcType.VideoGame + ) + val gameOfThronesSeries = Source( + id = 9, + title = "Game of Thrones", + dateS = 2011, + type = SrcType.Series + ) + val theHobbitMovie = Source( + id = 10, + title = "The Hobbit: An Unexpected Journey", + dateS = 2012, + type = SrcType.Movie ) -} \ No newline at end of file + val allSources: List = listOf( + theLordOfTheRingsMovie, + theTwoTowersMovie, + theReturnOfTheKingMovie, + harryPotterSeries, + starWarsMovie, + spiderManMovie, + theWitcherVideoGame, + theElderScrollsVideoGame, + gameOfThronesSeries, + theHobbitMovie + ) +} diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/UserStub.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/UserStub.kt new file mode 100644 index 0000000..b05fbb3 --- /dev/null +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/data/local/UserStub.kt @@ -0,0 +1,80 @@ +package com.example.what_the_fantasy.data.local + +import com.example.what_the_fantasy.data.model.User + +object UserStub { + val user1 = User( + id = 1, + username = "Aragorn123", + email = "aragorn@example.com", + date = "2022-01-15", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg" + ) + val user2 = User( + id = 2, + username = "Legolas456", + email = "legolas@example.com", + date = "2021-05-23", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg" + ) + val user3 = User( + id = 3, + username = "Gandalf789", + email = "gandalf@example.com", + date = "2020-09-10", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg" + ) + val user4 = User( + id = 4, + username = "FrodoBaggins", + email = "frodo@example.com", + date = "2023-03-18", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg" + ) + val user5 = User( + id = 5, + username = "Gimli999", + email = "gimli@example.com", + date = "2022-07-04", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg" + ) + val user6 = User( + id = 6, + username = "Galadriel321", + email = "galadriel@example.com", + date = "2021-11-30", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg" + ) + val user7 = User( + id = 7, + username = "Boromir654", + email = "boromir@example.com", + date = "2023-06-22", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg" + ) + val user8 = User( + id = 8, + username = "Eowyn777", + email = "eowyn@example.com", + date = "2022-04-11", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg" + ) + val user9 = User( + id = 9, + username = "Saruman888", + email = "saruman@example.com", + date = "2021-08-15", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg" + ) + val user10 = User( + id = 10, + username = "Faramir222", + email = "faramir@example.com", + date = "2023-02-08", + imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg" + ) + + val allUsers: List = listOf( + user1, user2, user3, user4, user5, user6, user7, user8, user9, user10 + ) +} \ No newline at end of file