-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'org.jetbrains.kotlin.android' | ||
id 'kotlin-kapt' | ||
id 'kotlin-parcelize' | ||
id 'androidx.navigation.safeargs.kotlin' | ||
|
||
} | ||
|
||
android { | ||
namespace 'com.rezazali.movieapp' | ||
compileSdk 33 | ||
|
||
defaultConfig { | ||
applicationId "com.rezazali.movieapp" | ||
minSdk 23 | ||
targetSdk 33 | ||
versionCode 1 | ||
versionName "1.0" | ||
vectorDrawables.useSupportLibrary = true | ||
multiDexEnabled true | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '11' | ||
} | ||
buildFeatures { | ||
viewBinding = true | ||
dataBinding = true | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation 'androidx.core:core-ktx:1.9.0' | ||
implementation 'androidx.appcompat:appcompat:1.6.0' | ||
implementation 'com.google.android.material:material:1.8.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | ||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' | ||
|
||
//handle large library | ||
def multidex_version = "2.0.1" | ||
implementation "androidx.multidex:multidex:$multidex_version" | ||
|
||
//life cycle for view model | ||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' | ||
implementation "android.arch.lifecycle:extensions:1.1.1" | ||
|
||
|
||
//retrofit for call rest api | ||
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | ||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' | ||
|
||
//rxjava3 for reactive programing | ||
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' | ||
implementation 'io.reactivex.rxjava3:rxjava:3.0.2' | ||
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0' | ||
|
||
//glide for load image | ||
implementation 'com.github.bumptech.glide:glide:4.14.2' | ||
kapt 'com.github.bumptech.glide:compiler:4.14.2' | ||
|
||
//exo player for play video | ||
def exo_version = "2.18.2" | ||
implementation "com.google.android.exoplayer:exoplayer-core:$exo_version" | ||
implementation "com.google.android.exoplayer:exoplayer-dash:$exo_version" | ||
implementation "com.google.android.exoplayer:exoplayer-ui:$exo_version" | ||
|
||
//flex recycler view | ||
implementation 'com.google.android.flexbox:flexbox:3.0.0' | ||
|
||
//dot indicator for pager | ||
implementation("com.tbuonomo:dotsindicator:4.3") | ||
|
||
|
||
implementation "androidx.viewpager2:viewpager2:1.0.0" | ||
|
||
///navigation graph for related each fragment | ||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3' | ||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3' | ||
implementation 'androidx.navigation:navigation-fragment:2.5.3' | ||
implementation 'androidx.navigation:navigation-ui:2.5.3' | ||
|
||
//for load image | ||
implementation 'com.squareup.picasso:picasso:2.71828' | ||
|
||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.rezazali.movieapp | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.rezazali.movieapp", appContext.packageName) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@drawable/namava" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.MovieApp" | ||
tools:targetApi="31"> | ||
<activity | ||
android:screenOrientation="portrait" | ||
android:name=".presentation.MainActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.app.lib_name" | ||
android:value="" /> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.rezazali.movieapp.domain.models | ||
|
||
import com.google.gson.annotations.Expose | ||
import com.google.gson.annotations.SerializedName | ||
|
||
|
||
data class BaseBannerMovie( | ||
@SerializedName("ALL_IN_ONE_VIDEO") | ||
@Expose | ||
val listBanner: List<BannerMovie> | ||
) | ||
|
||
data class BannerMovie( | ||
val banner_image: String, | ||
val banner_image_thumb: String, | ||
val banner_name: String, | ||
val banner_url: String, | ||
val id: String | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.rezazali.movieapp.domain.models | ||
|
||
import android.os.Parcelable | ||
import com.google.gson.annotations.Expose | ||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.parcelize.Parcelize | ||
|
||
|
||
data class BaseMovie( | ||
@SerializedName("ALL_IN_ONE_VIDEO") | ||
@Expose | ||
val baseMovie: List<Movie> | ||
) | ||
@Parcelize | ||
data class Movie( | ||
@SerializedName("cat_id") | ||
@Expose | ||
val cat_id: String, | ||
@SerializedName("category_image") | ||
@Expose | ||
val category_image: String, | ||
@SerializedName("category_image_thumb") | ||
@Expose | ||
val category_image_thumb: String, | ||
@SerializedName("category_name") | ||
@Expose | ||
val category_name: String, | ||
@SerializedName("cid") | ||
@Expose | ||
val cid: String, | ||
@SerializedName("id") | ||
@Expose | ||
val id: String, | ||
@SerializedName("rate_avg") | ||
@Expose | ||
val rate_avg: String, | ||
@SerializedName("totel_viewer") | ||
@Expose | ||
val totel_viewer: String, | ||
@SerializedName("video_description") | ||
@Expose | ||
val video_description: String, | ||
@SerializedName("video_duration") | ||
@Expose | ||
val video_duration: String, | ||
@SerializedName("video_id") | ||
@Expose | ||
val video_id: String, | ||
@SerializedName("video_thumbnail_b") | ||
@Expose | ||
val video_thumbnail_b: String, | ||
@SerializedName("video_thumbnail_s") | ||
@Expose | ||
val video_thumbnail_s: String, | ||
@SerializedName("video_title") | ||
@Expose | ||
val video_title: String, | ||
@SerializedName("video_type") | ||
@Expose | ||
val video_type: String, | ||
@SerializedName("video_url") | ||
@Expose | ||
val video_url: String | ||
) : Parcelable | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.rezazali.movieapp.domain.utils | ||
|
||
enum class IdCategory(val idWeb: Int) { | ||
SCARY(25), | ||
DRAMA(18), | ||
ACTION(3), | ||
PERSIAN(4) | ||
} |