Compare commits

..

9 Commits

@ -2,7 +2,10 @@
## Overview ## Overview
___ ___
Description of my project This project use the API of [The Movie Database](https://www.themoviedb.org/?language=fr)
This project is still in development :construction:
## Documentation ## Documentation
___ ___
@ -19,7 +22,17 @@ Here are the prerequisites before launching the project.
| ---- | ---- | | ---- | ---- |
| The integrated Development Environment (IDE) Android Studios |<img src="Documentation/images/Android_Studio_Trademark.png" alt="drawing" width="95" height="30" /> | | The integrated Development Environment (IDE) Android Studios |<img src="Documentation/images/Android_Studio_Trademark.png" alt="drawing" width="95" height="30" /> |
### Dependencies
- AndroidX
- Retrofit2 to use the api requests and moshi to parse data
- Coil for load the images
- Room Database to store local data
- The databinding
- JUnit is included too because i want to add tests on the project in the future
### Installation ### Installation
To launch the project, open `Android Studios` and click on `file` on the left corner. To launch the project, open `Android Studios` and click on `file` on the left corner.
Click on `open` and open the `Sources` folder in the project. Click on `open` and open the `Sources` folder in the project and let the IDE index the files

@ -8,7 +8,14 @@ android {
namespace 'fr.iut.pm.movieapplication' namespace 'fr.iut.pm.movieapplication'
compileSdk 33 compileSdk 33
def apikeyPropertiesFile = rootProject.file("apikey.properties")
def apikeyProperties = new Properties()
apikeyProperties.load(new FileInputStream(apikeyPropertiesFile))
defaultConfig { defaultConfig {
buildConfigField("String", "API_KEY", apikeyProperties['API_KEY'])
applicationId "fr.iut.pm.movieapplication" applicationId "fr.iut.pm.movieapplication"
minSdk 16 minSdk 16
targetSdk 33 targetSdk 33

@ -17,6 +17,7 @@
tools:targetApi="33"> tools:targetApi="33">
<activity <activity
android:name=".ui.activity.MainActivity" android:name=".ui.activity.MainActivity"
android:screenOrientation="portrait"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>

@ -8,6 +8,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
import fr.iut.pm.movieapplication.databinding.FragmentFavoritesCategoryBinding import fr.iut.pm.movieapplication.databinding.FragmentFavoritesCategoryBinding
import fr.iut.pm.movieapplication.ui.adapter.MovieAdapter import fr.iut.pm.movieapplication.ui.adapter.MovieAdapter
import fr.iut.pm.movieapplication.ui.dialog.MovieDialog
import fr.iut.pm.movieapplication.ui.interfaces.MovieSelection import fr.iut.pm.movieapplication.ui.interfaces.MovieSelection
import fr.iut.pm.movieapplication.ui.viewmodel.FavoritesVM import fr.iut.pm.movieapplication.ui.viewmodel.FavoritesVM
@ -47,6 +48,10 @@ class FavoritesFragment : Fragment(), MovieSelection {
override fun onMovieSelected(movieId: Int) { override fun onMovieSelected(movieId: Int) {
TODO("Not yet implemented") val dialog = MovieDialog()
val args = Bundle()
args.putInt("movieId",movieId)
dialog.arguments = args
dialog.show(parentFragmentManager, "tag")
} }
} }

@ -1,5 +1,7 @@
package fr.iut.pm.movieapplication.utils package fr.iut.pm.movieapplication.utils
import fr.iut.pm.movieapplication.BuildConfig
class Constants { class Constants {
companion object { companion object {
@ -7,7 +9,7 @@ class Constants {
//API //API
const val BASE_URL = "https://api.themoviedb.org/3/" const val BASE_URL = "https://api.themoviedb.org/3/"
const val IMG_URL = "https://image.tmdb.org/t/p/w500" const val IMG_URL = "https://image.tmdb.org/t/p/w500"
const val API_KEY = "8f14a279249638d7f247d0d7298b21b4" const val API_KEY = BuildConfig.API_KEY
//VIEW PAGINATION //VIEW PAGINATION

@ -74,9 +74,11 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/home_popular_tv_shows_recycler_view" android:id="@+id/home_popular_tv_shows_recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginBottom="@dimen/default_margin"
android:layout_height="250dp" android:layout_height="250dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/> />
</LinearLayout> </LinearLayout>

@ -28,7 +28,6 @@
android:layout_marginEnd="@dimen/default_margin" android:layout_marginEnd="@dimen/default_margin"
android:layout_marginTop="@dimen/default_margin" android:layout_marginTop="@dimen/default_margin"
android:layout_marginBottom="@dimen/default_margin" android:layout_marginBottom="@dimen/default_margin"
android:background="@color/light_grey"
android:layout_marginRight="@dimen/default_margin" /> android:layout_marginRight="@dimen/default_margin" />
<ProgressBar <ProgressBar

@ -26,7 +26,6 @@
android:layout_marginEnd="@dimen/default_margin" android:layout_marginEnd="@dimen/default_margin"
android:layout_marginTop="@dimen/default_margin" android:layout_marginTop="@dimen/default_margin"
android:layout_marginBottom="@dimen/default_margin" android:layout_marginBottom="@dimen/default_margin"
android:background="@color/light_grey"
android:layout_marginRight="@dimen/default_margin" /> android:layout_marginRight="@dimen/default_margin" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView

@ -13,4 +13,28 @@
<item name="android:statusBarColor" tools:targetApi="21">?attr/colorPrimaryVariant</item> <item name="android:statusBarColor" tools:targetApi="21">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
</style> </style>
<style name="DefaultTextStyle">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">16sp</item>
<item name="android:fontFamily">@font/source_sans_pro</item>
</style>
<style name="SubtitleTextStyle" parent="DefaultTextStyle">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">20sp</item>
</style>
<style name="SectionTitleStyle" parent="DefaultTextStyle">
<item name="android:textSize">24sp</item>
</style>
<style name="TitleTextStyle" parent="SubtitleTextStyle">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">24sp</item>
</style>
<style name="BottomMenuStyle" parent="Widget.Material3.BottomNavigationView">
<item name="android:textSize">16sp</item>
</style>
</resources> </resources>
Loading…
Cancel
Save