diff --git a/.gitignore b/.gitignore index a8b0d1d..aa724b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,15 @@ -# ---> Android -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Log/OS Files -*.log - -# Android Studio generated files and folders -captures/ -.externalNativeBuild/ -.cxx/ -*.apk -output.json - -# IntelliJ *.iml -.idea/ -misc.xml -deploymentTargetDropDown.xml -render.experimental.xml - -# Keystore files -*.jks -*.keystore - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Android Profiling -*.hprof - +.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 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..51459b4 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +WatchLinkApp \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b589d56 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..ae388c2 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..44ca2d9 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,41 @@ + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..0fc3113 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8978d23 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..47f576e --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,73 @@ +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "com.example.watchlinkapp" + compileSdk = 34 + + defaultConfig { + applicationId = "com.example.watchlinkapp" + minSdk = 27 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary = true + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = "1.4.3" + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +dependencies { + implementation("com.google.accompanist:accompanist-systemuicontroller:0.28.0") + implementation("com.google.accompanist:accompanist-pager:0.18.0") + implementation("androidx.navigation:navigation-compose:2.6.0") + implementation("androidx.core:core-ktx:1.12.0") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") + implementation("androidx.activity:activity-compose:1.8.0") + implementation(platform("androidx.compose:compose-bom:2023.10.00")) + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.ui:ui-graphics") + implementation("androidx.compose.ui:ui-tooling-preview") + implementation("androidx.compose.material3:material3") + implementation("androidx.navigation:navigation-runtime-ktx:2.7.4") + implementation("androidx.wear.compose:compose-material3:1.0.0-alpha13") + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.00")) + androidTestImplementation("androidx.compose.ui:ui-test-junit4") + debugImplementation("androidx.compose.ui:ui-tooling") + debugImplementation("androidx.compose.ui:ui-test-manifest") +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/app/src/androidTest/java/com/example/watchlinkapp/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/watchlinkapp/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..a8d39a8 --- /dev/null +++ b/app/src/androidTest/java/com/example/watchlinkapp/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.watchlinkapp + +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.example.watchlinkapp", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..dd310e2 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Favorite.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Favorite.kt new file mode 100644 index 0000000..ee73f22 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Favorite.kt @@ -0,0 +1,2 @@ +package com.example.watchlinkapp.ComposeUI + diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Login.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Login.kt new file mode 100644 index 0000000..206d4c6 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Login.kt @@ -0,0 +1,113 @@ +package com.example.watchlinkapp.ComposeUI + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TextField +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import androidx.navigation.NavGraph.Companion.findStartDestination +import com.example.watchlinkapp.ComposeUI.Navigation.Screen +import com.example.watchlinkapp.R + +@Composable +fun Login(navController: NavController) { + var username by remember { mutableStateOf("") } + var password by remember { mutableStateOf("") } + + Column( + modifier = Modifier + .fillMaxSize() + .background(color = colorResource(id = R.color.backgroundColor)), + verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .weight(2f) + .padding(bottom = 10.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = stringResource(id = R.string.login_title), + fontSize = 26.sp, + fontWeight = FontWeight.Medium, + color = Color.White + ) + Spacer(modifier = Modifier.height(16.dp)) + TextField( + value = username, + onValueChange = { username = it }, + label = { Text("Имя пользователя") }, + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = password, + onValueChange = { password = it }, + label = { Text("Пароль") }, + visualTransformation = PasswordVisualTransformation(), + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password), + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(16.dp)) + Button(shape = RoundedCornerShape(5.dp), onClick = { navController.navigate(Screen.MovieCatalog.route)}, + colors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.backgroundNavBarColor) + )) { + Text("Вход") + } + Spacer(modifier = Modifier.height(16.dp)) + TextButton(onClick = { navController.navigate(Screen.Signup.route) }) { + Text(text = "У меня нет учетной записи") + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/MainNavbar.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/MainNavbar.kt new file mode 100644 index 0000000..e41e655 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/MainNavbar.kt @@ -0,0 +1,230 @@ +package com.example.watchlinkapp.ComposeUI.Navigation + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.NavigationBar +import androidx.compose.material3.NavigationBarItem +import androidx.compose.material3.NavigationBarItemColors +import androidx.compose.material3.NavigationBarItemDefaults +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBar +import androidx.compose.material3.TopAppBarDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.blur +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavDestination +import androidx.navigation.NavDestination.Companion.hierarchy +import androidx.navigation.NavGraph.Companion.findStartDestination +import androidx.navigation.NavHostController +import androidx.navigation.NavType +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.currentBackStackEntryAsState +import androidx.navigation.compose.rememberNavController +import androidx.navigation.navArgument +import com.example.watchlinkapp.ComposeUI.Login +import com.example.watchlinkapp.ComposeUI.Profile +import com.example.watchlinkapp.ComposeUI.Search +import com.example.watchlinkapp.ComposeUI.Signup +import com.example.watchlinkapp.Movie.ComposeUI.MovieCatalog +import com.example.watchlinkapp.Movie.ComposeUI.MovieView +import com.example.watchlinkapp.R + + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Topbar( + navController: NavHostController, + currentScreen: Screen? +) { + var showImage by remember { mutableStateOf(true) } + TopAppBar( + colors = TopAppBarDefaults.smallTopAppBarColors( + containerColor = colorResource(id = R.color.backgroundColor), + titleContentColor = colorResource(id = R.color.statusBarTextColor), + ), + + title = { + if (showImage) { + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End, verticalAlignment = Alignment.CenterVertically) { +// } + Column(horizontalAlignment = Alignment.End) { + Image( + painter = painterResource(id = R.drawable.ivi), + contentDescription = "ivi", + Modifier.padding(end = 14.dp).size(50.dp) + ) + } + } + } + + }, + navigationIcon = { + if ( + navController.previousBackStackEntry != null && (currentScreen == null || !currentScreen.showInBottomBar) + ) { + showImage = false + IconButton(onClick = { navController.navigateUp() }) { + Icon( + imageVector = Icons.AutoMirrored.Filled.ArrowBack, + contentDescription = null, + tint = MaterialTheme.colorScheme.onPrimary + ) + } + } + else{ + showImage = true + } + } + ) +} + +@Composable +fun Navbar( + navController: NavHostController, + currentDestination: NavDestination?, + modifier: Modifier = Modifier +) { + Row( + modifier + .fillMaxWidth() + .background( + colorResource(id = R.color.backgroundNavBarColor), + RoundedCornerShape(10.dp) + ), horizontalArrangement = Arrangement.SpaceAround) { + Screen.bottomBarItems.forEach { screen -> + val isSelected = currentDestination?.hierarchy?.any { it.route == screen.route } == true + val background = + if (isSelected) MaterialTheme.colorScheme.primary.copy(alpha = 0.1f) else Color.Transparent + val contentColor = + if (isSelected) MaterialTheme.colorScheme.primary else Color.LightGray + + Box( + modifier = Modifier + .clip(RoundedCornerShape(15.dp)) + //.background(colorResource(id = R.color.backgroundNavBarColor)) + .clickable(onClick = { + navController.navigate(screen.route) { + popUpTo(navController.graph.findStartDestination().id) { + saveState = true + } + launchSingleTop = true + restoreState = true + } + }) + + ) { + Row( + modifier = Modifier + .padding(12.dp),//.background(Color.Red), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Center + ) { + Icon( + imageVector = screen.icon, + contentDescription = null, + tint = contentColor + ) + AnimatedVisibility( + visible = isSelected + ) { + Text( + text = stringResource(screen.resourceId), + color = contentColor + ) + } + } + } + } + } +} + +@Composable +fun Navhost( + navController: NavHostController, + innerPadding: PaddingValues, modifier: + Modifier = Modifier +) { + NavHost( + navController, + startDestination = Screen.Login.route, + modifier.padding(innerPadding) + ) { + composable(Screen.MovieCatalog.route) { MovieCatalog(navController) } + composable(Screen.Profile.route) { Profile() } + composable(Screen.Signup.route) { Signup(navController) } + composable(Screen.Login.route) { Login(navController) } + composable(Screen.Search.route) { Search(navController) } + composable( + Screen.MovieView.route, + arguments = listOf(navArgument("id") { type = NavType.IntType }) + ) { backStackEntry -> + backStackEntry.arguments?.let { MovieView(it.getInt("id")) } + } + } +} + +@Composable +fun MainNavbar() { + val navController = rememberNavController() + val navBackStackEntry by navController.currentBackStackEntryAsState() + val currentDestination = navBackStackEntry?.destination + val currentScreen = currentDestination?.route?.let { Screen.getItem(it) } + + Scaffold(modifier = Modifier, + topBar = { + if (currentScreen != null) { + if (currentScreen.isAuthenticated) { + Topbar(navController, currentScreen) + } + } + }, + bottomBar = { + if (currentScreen == null || (currentScreen.showInBottomBar && currentScreen.isAuthenticated)) { + Navbar(navController, currentDestination, Modifier.padding(all = 8.dp).background(colorResource(id = R.color.backgroundColor))) + } + }, + containerColor = colorResource(id = R.color.backgroundColor) + ) { innerPadding -> + Navhost(navController, innerPadding) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/Screen.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/Screen.kt new file mode 100644 index 0000000..f4d508e --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Navigation/Screen.kt @@ -0,0 +1,38 @@ +package com.example.watchlinkapp.ComposeUI.Navigation + +import androidx.annotation.StringRes +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.AccountCircle +import androidx.compose.material.icons.filled.Favorite +import androidx.compose.material.icons.filled.Home +import androidx.compose.material.icons.filled.List +import androidx.compose.material.icons.filled.Search +import androidx.compose.ui.graphics.vector.ImageVector +import com.example.watchlinkapp.R + +enum class Screen ( + val route: String, + @StringRes val resourceId: Int, + val icon: ImageVector = Icons.Filled.Favorite, + val showInBottomBar: Boolean = true, + val isAuthenticated: Boolean = true, +){ + MovieCatalog("movie-catalog", R.string.movie_catalog_title, Icons.Filled.Home), + Profile("profile", R.string.profile_title, Icons.Filled.AccountCircle), + Search("search", R.string.search_title, Icons.Filled.Search), + Signup("signup", R.string.signup_title, Icons.Filled.Search, showInBottomBar = false, isAuthenticated = false), + Login("login", R.string.login_title, Icons.Filled.Search, showInBottomBar = false, isAuthenticated = false), + MovieView("movie-view/{id}", R.string.movie_view_title, Icons.Filled.List, showInBottomBar = false); + companion object { + val bottomBarItems = listOf( + MovieCatalog, + Profile, + Search, + ) + + fun getItem(route: String): Screen? { + val findRoute = route.split("/").first() + return values().find { value -> value.route.startsWith(findRoute) } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Profile.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Profile.kt new file mode 100644 index 0000000..323b969 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Profile.kt @@ -0,0 +1,122 @@ +package com.example.watchlinkapp.ComposeUI + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TextField +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.example.watchlinkapp.R + +@Composable +fun Profile(){ + var phoneNumber by remember { mutableStateOf("Ваш номер телефона") } + var FIO by remember { mutableStateOf("Имя пользователя") } + var dateOfBirth by remember { mutableStateOf("01-01-2000") } + Column( + modifier = Modifier + .fillMaxSize() + .background(color = colorResource(id = R.color.backgroundColor)), + verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .weight(2f) + .padding(bottom = 10.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Image(painter = painterResource(id = R.drawable.icon_profile), contentDescription = "", Modifier.size(140.dp)) + Spacer(modifier = Modifier.height(16.dp)) + Text( + text = "Профиль", + fontSize = 26.sp, + fontWeight = FontWeight.Medium, + color = Color.White + ) + Spacer(modifier = Modifier.height(16.dp)) + TextField( + value = FIO, + onValueChange = { FIO = it }, + label = { Text("Имя пользователя") }, + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = dateOfBirth, + onValueChange = { dateOfBirth = it }, + label = { Text("Дата рождения") }, + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = phoneNumber, + onValueChange = { phoneNumber = it }, + label = { Text("Номер телефона") }, + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(16.dp)) + Button( + shape = RoundedCornerShape(5.dp), + onClick = { /* Handle saving data */ }, + colors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) { + Text("Сохранить") + } + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Search.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Search.kt new file mode 100644 index 0000000..a33f304 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Search.kt @@ -0,0 +1,189 @@ +package com.example.watchlinkapp.ComposeUI + + +import androidx.activity.OnBackPressedCallback +import androidx.activity.compose.LocalOnBackPressedDispatcherOwner +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.Card +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.watchlinkapp.ComposeUI.Navigation.Screen +import androidx.compose.foundation.layout.* +import androidx.compose.material.* +import androidx.compose.material3.TextField +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.MutableState +import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextRange +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.input.TextFieldValue +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.example.watchlinkapp.Movie.Model.Movie +import com.example.watchlinkapp.Movie.Model.getMovies +import com.example.watchlinkapp.R + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Search(navController: NavController) { + var movies by remember { mutableStateOf(getMovies()) } + var filtredMovies by remember { mutableStateOf(getMovies().shuffled().take(10)) } + var searchText by remember { mutableStateOf("") } + + Column(modifier = Modifier.fillMaxSize()) { + SearchBar( + movies = movies, + onMoviesChanged = { updatedMovies -> filtredMovies = updatedMovies }, + searchDisplay = searchText, + onSearchDisplayChanged = { text -> + searchText = text + }, + onSearchDisplayClosed = { filtredMovies = getMovies() }, + modifier = Modifier.fillMaxWidth(), + tint = Color.White + ) + + LazyColumn( + modifier = Modifier + .background(colorResource(id = R.color.backgroundColor)) + .padding(top = 8.dp) + ) { + item { + Text( + text = "Возможно тебя заинтересует", + color = colorResource(id = R.color.textColor), + fontWeight = FontWeight.Bold, + fontSize = 15.sp, + modifier = Modifier.padding(start = 16.dp, bottom = 12.dp) + ) + } + val chunkedMovies = filtredMovies.chunked(3) + chunkedMovies.forEach { movieChunk -> + item { + Row( + modifier = Modifier + .padding(start = 8.dp, end = 8.dp, bottom = 8.dp) + .fillMaxWidth(), + horizontalArrangement = Arrangement.Start + ) { + movieChunk.forEach { movie -> + val movieId = + Screen.MovieView.route.replace("{id}", movie.id.toString()) + Card( + modifier = Modifier + .padding( + start = 8.dp, + end = 2.dp, + top = 5.dp + ) + .width(110.dp) + .fillMaxWidth() + .clickable { navController.navigate(movieId) }, + shape = RoundedCornerShape(5.dp) + ) { + Image( + painter = painterResource(id = movie.imageResourceId), + contentDescription = "image", + contentScale = ContentScale.Crop, + modifier = Modifier.fillMaxWidth() + ) + } + } + } + } + } + } + } +} +@Composable +fun SearchBar( + movies: List, + onMoviesChanged: (List) -> Unit, + searchDisplay: String, + onSearchDisplayChanged: (String) -> Unit, + onSearchDisplayClosed: () -> Unit, + modifier: Modifier = Modifier, + tint: Color = MaterialTheme.colorScheme.onPrimary, +) { + val focusManager = LocalFocusManager.current + + val onBackPressedDispatcher = LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher + DisposableEffect(key1 = onBackPressedDispatcher) { + val callback = object : OnBackPressedCallback(true) { + override fun handleOnBackPressed() { + focusManager.clearFocus() + onSearchDisplayClosed() + } + } + onBackPressedDispatcher?.addCallback(callback) + + onDispose { + callback.remove() + } + } + + var textFieldValue by remember { + mutableStateOf(TextFieldValue(searchDisplay, TextRange(searchDisplay.length))) + } + + TextField( + colors = TextFieldDefaults.colors( + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedTextColor = Color.White, + unfocusedTextColor = Color.White + ), + value = textFieldValue, + onValueChange = { + textFieldValue = it + onSearchDisplayChanged(it.text) + val updatedMovies = movies.filter { movie -> movie.title.startsWith(it.text, ignoreCase = true) } + onMoviesChanged(updatedMovies) + }, + trailingIcon = { + // Ваш иконка поиска + }, + modifier = modifier, + label = { + Text(text = "Поиск...", color = tint) + }, + keyboardOptions = KeyboardOptions( + imeAction = ImeAction.Done + ), + keyboardActions = KeyboardActions( + onDone = { + focusManager.clearFocus() + onSearchDisplayClosed() + } + ), + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ComposeUI/Signup.kt b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Signup.kt new file mode 100644 index 0000000..d1f74ad --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ComposeUI/Signup.kt @@ -0,0 +1,129 @@ +package com.example.watchlinkapp.ComposeUI + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TextField +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import androidx.navigation.NavGraph.Companion.findStartDestination +import com.example.watchlinkapp.ComposeUI.Navigation.Screen +import com.example.watchlinkapp.R + +@Composable +fun Signup(navController: NavController) { + var username by remember { mutableStateOf("") } + var password by remember { mutableStateOf("") } + + Column( + modifier = Modifier + .fillMaxSize() + .background(color = colorResource(id = R.color.backgroundColor)), + verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .weight(2f) + .padding(bottom = 10.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = stringResource(id = R.string.signup_title), + fontSize = 26.sp, + fontWeight = FontWeight.Medium, + color = Color.White + ) + Spacer(modifier = Modifier.height(16.dp)) + TextField( + value = username, + onValueChange = { username = it }, + label = { Text("Имя пользователя") }, + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = password, + onValueChange = { password = it }, + label = { Text("Пароль") }, + visualTransformation = PasswordVisualTransformation(), + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password), + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(8.dp)) + TextField( + value = password, + onValueChange = { password = it }, + label = { Text("Подтвердите пароль") }, + visualTransformation = PasswordVisualTransformation(), + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password), + colors = TextFieldDefaults.colors( + unfocusedLabelColor = Color.LightGray, + focusedLabelColor = Color.LightGray, + unfocusedTextColor = colorResource(id = R.color.button), + focusedTextColor = colorResource(id = R.color.button), + unfocusedContainerColor = colorResource(id = R.color.backgroundNavBarColor), + focusedContainerColor = colorResource(id = R.color.backgroundNavBarColor) + ) + ) + Spacer(modifier = Modifier.height(16.dp)) + Button(shape = RoundedCornerShape(5.dp), onClick = { navController.navigate(Screen.Login.route) }, + colors = ButtonDefaults.buttonColors( + containerColor = colorResource(id = R.color.backgroundNavBarColor) + )) { + Text("Зарегистрироваться") + } + Spacer(modifier = Modifier.height(16.dp)) + TextButton(onClick = { navController.navigate(Screen.Login.route) }) { + Text(text = "У меня есть учетная запись") + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/MainActivity.kt b/app/src/main/java/com/example/watchlinkapp/MainActivity.kt new file mode 100644 index 0000000..63c793c --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/MainActivity.kt @@ -0,0 +1,29 @@ +package com.example.watchlinkapp + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.tooling.preview.Preview +import com.example.watchlinkapp.ComposeUI.Navigation.MainNavbar +import com.example.watchlinkapp.ComposeUI.Navigation.Topbar +import com.example.watchlinkapp.ui.theme.WatchLinkAppTheme +import com.google.accompanist.systemuicontroller.rememberSystemUiController + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + MainNavbar() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieCatalog.kt b/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieCatalog.kt new file mode 100644 index 0000000..d7562d2 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieCatalog.kt @@ -0,0 +1,138 @@ +package com.example.watchlinkapp.Movie.ComposeUI + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.watchlinkapp.ComposeUI.Navigation.Screen +import com.example.watchlinkapp.Movie.Model.Movie +import com.example.watchlinkapp.Movie.Model.getMovies +import com.example.watchlinkapp.R +import com.google.accompanist.pager.ExperimentalPagerApi +import com.google.accompanist.pager.HorizontalPager +import com.google.accompanist.pager.rememberPagerState +import kotlinx.coroutines.delay + +@Composable +fun MovieCatalog(navController: NavController) { + val movies = getMovies() + + LazyColumn( + modifier = Modifier + .background(colorResource(id = R.color.backgroundColor)) + ) { + item { + BannerView() + } + val genres = movies.map { it.genre }.distinct() + genres.forEach { genre -> + item { + Box( + modifier = Modifier + .padding(start = 10.dp) + .width(180.dp) + ) { + Text( + text = genre, + color = Color.White, + fontSize = 15.sp, + fontWeight = FontWeight.Normal, + modifier = Modifier + .padding(top = 8.dp) + .wrapContentWidth() + ) + } + } + item { + LazyRow( + modifier = Modifier + //.background(Color.Red) + .padding(bottom = 8.dp) + .fillMaxWidth() + ) { + val moviesByGenre = movies.filter { it.genre == genre } + items(moviesByGenre.size) { index -> + val movie = moviesByGenre[index] + val movieId = Screen.MovieView.route.replace("{id}", movie.id.toString()) + Card( + modifier = Modifier + .padding( + start = 8.dp, + end = 2.dp, + top = 5.dp + )//.background(Color.Green) + //.widthIn(min = 150.dp, max = 200.dp) + .width(110.dp) + .fillMaxWidth() + .clickable { navController.navigate(movieId) }, + shape = RoundedCornerShape(5.dp) + ) { + Image( + painter = painterResource(id = movie.imageResourceId), + contentDescription = "image", + contentScale = ContentScale.Crop, + modifier = Modifier + .fillMaxWidth() + //.clip((5.dp)) + ) + } + } + } + } + } + } +} +@OptIn(ExperimentalPagerApi::class) +@Composable +fun BannerView() { + val images = listOf( + painterResource(R.drawable.banner_image1), + painterResource(R.drawable.banner_image2), + painterResource(R.drawable.banner_image3) + ) + var currentPage by remember { mutableStateOf(0) } + LaunchedEffect(currentPage) { + while (true) { + delay(3000) + currentPage = (currentPage + 1) % images.size + } + } + val pagerState = rememberPagerState( + pageCount = images.size, + initialPage = currentPage, + infiniteLoop = true) + + HorizontalPager(state = pagerState) { page -> + Image( + painter = images[page], + contentDescription = null, + modifier = Modifier.fillMaxWidth(), + contentScale = ContentScale.FillWidth + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieView.kt b/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieView.kt new file mode 100644 index 0000000..c65ba1d --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/Movie/ComposeUI/MovieView.kt @@ -0,0 +1,153 @@ +package com.example.watchlinkapp.Movie.ComposeUI + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Divider +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Text +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.colorResource +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.example.watchlinkapp.Movie.Model.Movie +import com.example.watchlinkapp.Movie.Model.getMovies +import com.example.watchlinkapp.R + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun MovieView(id: Int) { + val movie = getMovies().find { it.id == id } + Column( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp) + ) { + movie?.let { + LazyColumn(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) { + item { + Image( + painter = painterResource(id = movie.imageResourceId), + contentDescription = null, // Укажите соответствующее описание + modifier = Modifier + //.fillMaxHeight() + .width(200.dp) + .clip(RoundedCornerShape(10.dp)), + contentScale = ContentScale.Crop + ) + } + item { + Column(modifier = Modifier.padding(start = 16.dp)) { + OutlinedTextField( + readOnly = true, + value = movie.title, + onValueChange = { /*TODO*/ }, + label = { Text("Title", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + OutlinedTextField( + readOnly = true, + value = "${movie.genre}", + onValueChange = { /*TODO*/ }, + label = { Text("Genre", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + OutlinedTextField( + readOnly = true, + value = "${movie.releaseYear}", + onValueChange = { /*TODO*/ }, + label = { Text("Release Year", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + OutlinedTextField( + readOnly = true, + value = "${movie.duration} minutes", + onValueChange = { /*TODO*/ }, + label = { Text("Duration", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + OutlinedTextField( + readOnly = true, + value = "${movie.rating}", + onValueChange = { /*TODO*/ }, + label = { Text("Rating", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + } + Divider(Modifier.padding(vertical = 16.dp)) + OutlinedTextField( + readOnly = true, + value = movie.synopsis, + onValueChange = { /*TODO*/ }, + label = { Text("Synopsis", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + OutlinedTextField( + readOnly = true, + value = "${movie.director}", + onValueChange = { /*TODO*/ }, + label = { Text("Director", color = Color.LightGray) }, + colors = TextFieldDefaults.outlinedTextFieldColors( + unfocusedTextColor = Color.LightGray, + focusedBorderColor = Color.Gray, // Цвет рамки при фокусе + unfocusedBorderColor = Color.Gray // Цвет рамки при отсутствии фокуса + ), + modifier = Modifier.padding(bottom = 8.dp) + ) + } + } + } + } +} diff --git a/app/src/main/java/com/example/watchlinkapp/Movie/Model/Movie.kt b/app/src/main/java/com/example/watchlinkapp/Movie/Model/Movie.kt new file mode 100644 index 0000000..b115353 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/Movie/Model/Movie.kt @@ -0,0 +1,208 @@ +package com.example.watchlinkapp.Movie.Model + +import com.example.watchlinkapp.R +import java.io.Serializable + +data class Movie( + val id: Int, + val title: String, + val genre: String, + val releaseYear: Int, + val duration: Double, + val rating: Double, + val synopsis: String, + val director: String, + val imageResourceId: Int +) : Serializable + +fun getMovies(): List { + return listOf( + Movie( + 1, + "Inception", + "Sci-Fi", + 2010, + 2.28, + 8.8, + "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.", + "Christopher Nolan", + R.drawable.image1 + ), + Movie( + 2, + "The Shawshank Redemption", + "Drama", + 1994, + 2.22, + 9.3, + "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.", + "Frank Darabont", + R.drawable.image2 + ), + Movie( + 3, + "The Godfather", + "Crime", + 1972, + 2.58, + 9.2, + "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.", + "Francis Ford Coppola", + R.drawable.image3 + ), + Movie( + 4, + "The Dark Knight", + "Action", + 2008, + 2.32, + 9.0, + "When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, Batman must accept one of the greatest psychological and physical tests of his ability to fight injustice.", + "Christopher Nolan", + R.drawable.image4 + ), + Movie( + 5, + "Pulp Fiction", + "Crime", + 1994, + 2.34, + 8.9, + "The lives of two mob hitmen, a boxer, a gangster and his wife, and a pair of diner bandits intertwine in four tales of violence and redemption.", + "Quentin Tarantino", + R.drawable.image5 + ), + Movie( + 6, + "Interstellar", + "Sci-Fi", + 2014, + 2.49, + 8.6, + "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", + "Christopher Nolan", + R.drawable.image6 + ), + Movie( + 7, + "The Matrix", + "Sci-Fi", + 1999, + 2.16, + 8.7, + "A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its controllers.", + "Lana Wachowski, Lilly Wachowski", + R.drawable.image7 + ), + Movie( + 8, + "Gravity", + "Sci-Fi", + 2013, + 1.91, + 7.7, + "Two astronauts work together to survive after an accident leaves them stranded in space.", + "Alfonso Cuarón", + R.drawable.image8 + ), + Movie( + 9, + "Forrest Gump", + "Drama", + 1994, + 2.22, + 8.8, + "The presidencies of Kennedy and Johnson, the Vietnam War, and the Watergate scandal unfold through the perspective of an Alabama man with an IQ of 75.", + "Robert Zemeckis", + R.drawable.image9 + ), + Movie( + 10, + "The Green Mile", + "Drama", + 1999, + 3.09, + 8.6, + "The lives of guards on Death Row are affected by one of their charges: a black man accused of child murder and rape, yet who has a mysterious gift.", + "Frank Darabont", + R.drawable.image10 + ), + Movie( + 11, + "The Pursuit of Happyness", + "Drama", + 2006, + 1.89, + 8.0, + "A struggling salesman takes custody of his son as he's poised to begin a life-changing professional endeavor.", + "Gabriele Muccino", + R.drawable.image11 + ), + Movie( + 12, + "The Departed", + "Crime", + 2006, + 2.31, + 8.5, + "An undercover cop and a mole in the police attempt to identify each other while infiltrating an Irish gang in South Boston.", + "Martin Scorsese", + R.drawable.image12 + ), + Movie( + 13, + "Goodfellas", + "Crime", + 1990, + 2.25, + 8.7, + "The story of Henry Hill and his life in the mob, covering his relationship with his wife Karen Hill and his mob partners Jimmy Conway and Tommy DeVito in the Italian-American crime syndicate.", + "Martin Scorsese", + R.drawable.image13 + ), + Movie( + 14, + "Die Hard", + "Action", + 1988, + 2.12, + 8.2, + "An NYPD officer tries to save his wife and several others taken hostage by German terrorists during a Christmas party at the Nakatomi Plaza in Los Angeles.", + "John McTiernan", + R.drawable.image14 + ), + Movie( + 15, + "Mad Max: Fury Road", + "Action", + 2015, + 2.0, + 8.1, + "In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search of her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max.", + "George Miller", + R.drawable.image15 + ), + Movie( + 16, + "Reservoir Dogs", + "Crime", + 1992, + 1.40, + 8.3, + "When a simple jewelry heist goes horribly wrong, the surviving criminals begin to suspect that one of them is a police informant.", + "Quentin Tarantino", + R.drawable.image16 + ), + Movie( + 17, + "Django Unchained", + "Crime", + 2012, + 2.45, + 8.4, + "With the help of a German bounty hunter, a freed slave sets out to rescue his wife from a brutal Mississippi plantation owner.", + "Quentin Tarantino", + R.drawable.image17 + ) + ) +} diff --git a/app/src/main/java/com/example/watchlinkapp/ui/theme/Color.kt b/app/src/main/java/com/example/watchlinkapp/ui/theme/Color.kt new file mode 100644 index 0000000..511982c --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package com.example.watchlinkapp.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Purple40 = Color(0xFF6650a4) +val PurpleGrey40 = Color(0xFF625b71) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ui/theme/Theme.kt b/app/src/main/java/com/example/watchlinkapp/ui/theme/Theme.kt new file mode 100644 index 0000000..384c426 --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ui/theme/Theme.kt @@ -0,0 +1,70 @@ +package com.example.watchlinkapp.ui.theme + +import android.app.Activity +import android.os.Build +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalView +import androidx.core.view.WindowCompat + +private val DarkColorScheme = darkColorScheme( + primary = Purple80, + secondary = PurpleGrey80, + tertiary = Pink80 +) + +private val LightColorScheme = lightColorScheme( + primary = Purple40, + secondary = PurpleGrey40, + tertiary = Pink40 + + /* Other default colors to override + background = Color(0xFFFFFBFE), + surface = Color(0xFFFFFBFE), + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Color(0xFF1C1B1F), + onSurface = Color(0xFF1C1B1F), + */ +) + +@Composable +fun WatchLinkAppTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + // Dynamic color is available on Android 12+ + dynamicColor: Boolean = true, + content: @Composable () -> Unit +) { + val colorScheme = when { + dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { + val context = LocalContext.current + if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) + } + + darkTheme -> DarkColorScheme + else -> LightColorScheme + } + val view = LocalView.current + if (!view.isInEditMode) { + SideEffect { + val window = (view.context as Activity).window + window.statusBarColor = colorScheme.primary.toArgb() + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme + } + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/watchlinkapp/ui/theme/Type.kt b/app/src/main/java/com/example/watchlinkapp/ui/theme/Type.kt new file mode 100644 index 0000000..608649d --- /dev/null +++ b/app/src/main/java/com/example/watchlinkapp/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package com.example.watchlinkapp.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +// Set of Material typography styles to start with +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + /* Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ), + labelSmall = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Medium, + fontSize = 11.sp, + lineHeight = 16.sp, + letterSpacing = 0.5.sp + ) + */ +) \ No newline at end of file diff --git a/app/src/main/res/drawable/banner_image1.png b/app/src/main/res/drawable/banner_image1.png new file mode 100644 index 0000000..24fa6e6 Binary files /dev/null and b/app/src/main/res/drawable/banner_image1.png differ diff --git a/app/src/main/res/drawable/banner_image2.png b/app/src/main/res/drawable/banner_image2.png new file mode 100644 index 0000000..9a7abdf Binary files /dev/null and b/app/src/main/res/drawable/banner_image2.png differ diff --git a/app/src/main/res/drawable/banner_image3.png b/app/src/main/res/drawable/banner_image3.png new file mode 100644 index 0000000..e272fae Binary files /dev/null and b/app/src/main/res/drawable/banner_image3.png differ diff --git a/app/src/main/res/drawable/baseline_person_24.xml b/app/src/main/res/drawable/baseline_person_24.xml new file mode 100644 index 0000000..98730cd --- /dev/null +++ b/app/src/main/res/drawable/baseline_person_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/baseline_search_24.xml b/app/src/main/res/drawable/baseline_search_24.xml new file mode 100644 index 0000000..a5687c6 --- /dev/null +++ b/app/src/main/res/drawable/baseline_search_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/icon_profile.xml b/app/src/main/res/drawable/icon_profile.xml new file mode 100644 index 0000000..cb506e3 --- /dev/null +++ b/app/src/main/res/drawable/icon_profile.xml @@ -0,0 +1,14 @@ + + + + diff --git a/app/src/main/res/drawable/image1.jpg b/app/src/main/res/drawable/image1.jpg new file mode 100644 index 0000000..68f7be4 Binary files /dev/null and b/app/src/main/res/drawable/image1.jpg differ diff --git a/app/src/main/res/drawable/image10.png b/app/src/main/res/drawable/image10.png new file mode 100644 index 0000000..c925216 Binary files /dev/null and b/app/src/main/res/drawable/image10.png differ diff --git a/app/src/main/res/drawable/image11.png b/app/src/main/res/drawable/image11.png new file mode 100644 index 0000000..b396d78 Binary files /dev/null and b/app/src/main/res/drawable/image11.png differ diff --git a/app/src/main/res/drawable/image12.png b/app/src/main/res/drawable/image12.png new file mode 100644 index 0000000..530072c Binary files /dev/null and b/app/src/main/res/drawable/image12.png differ diff --git a/app/src/main/res/drawable/image13.png b/app/src/main/res/drawable/image13.png new file mode 100644 index 0000000..2b7961e Binary files /dev/null and b/app/src/main/res/drawable/image13.png differ diff --git a/app/src/main/res/drawable/image14.png b/app/src/main/res/drawable/image14.png new file mode 100644 index 0000000..51306b5 Binary files /dev/null and b/app/src/main/res/drawable/image14.png differ diff --git a/app/src/main/res/drawable/image15.png b/app/src/main/res/drawable/image15.png new file mode 100644 index 0000000..9e0e94d Binary files /dev/null and b/app/src/main/res/drawable/image15.png differ diff --git a/app/src/main/res/drawable/image16.png b/app/src/main/res/drawable/image16.png new file mode 100644 index 0000000..2553f26 Binary files /dev/null and b/app/src/main/res/drawable/image16.png differ diff --git a/app/src/main/res/drawable/image17.png b/app/src/main/res/drawable/image17.png new file mode 100644 index 0000000..956d2b4 Binary files /dev/null and b/app/src/main/res/drawable/image17.png differ diff --git a/app/src/main/res/drawable/image18.png b/app/src/main/res/drawable/image18.png new file mode 100644 index 0000000..23286a4 Binary files /dev/null and b/app/src/main/res/drawable/image18.png differ diff --git a/app/src/main/res/drawable/image19.png b/app/src/main/res/drawable/image19.png new file mode 100644 index 0000000..0067df0 Binary files /dev/null and b/app/src/main/res/drawable/image19.png differ diff --git a/app/src/main/res/drawable/image2.jpg b/app/src/main/res/drawable/image2.jpg new file mode 100644 index 0000000..24e475c Binary files /dev/null and b/app/src/main/res/drawable/image2.jpg differ diff --git a/app/src/main/res/drawable/image20.png b/app/src/main/res/drawable/image20.png new file mode 100644 index 0000000..4916b38 Binary files /dev/null and b/app/src/main/res/drawable/image20.png differ diff --git a/app/src/main/res/drawable/image21.png b/app/src/main/res/drawable/image21.png new file mode 100644 index 0000000..51d0137 Binary files /dev/null and b/app/src/main/res/drawable/image21.png differ diff --git a/app/src/main/res/drawable/image3.jpg b/app/src/main/res/drawable/image3.jpg new file mode 100644 index 0000000..8b671b9 Binary files /dev/null and b/app/src/main/res/drawable/image3.jpg differ diff --git a/app/src/main/res/drawable/image4.jpg b/app/src/main/res/drawable/image4.jpg new file mode 100644 index 0000000..53e0c40 Binary files /dev/null and b/app/src/main/res/drawable/image4.jpg differ diff --git a/app/src/main/res/drawable/image5.jpg b/app/src/main/res/drawable/image5.jpg new file mode 100644 index 0000000..7af5116 Binary files /dev/null and b/app/src/main/res/drawable/image5.jpg differ diff --git a/app/src/main/res/drawable/image6.jpg b/app/src/main/res/drawable/image6.jpg new file mode 100644 index 0000000..89808b9 Binary files /dev/null and b/app/src/main/res/drawable/image6.jpg differ diff --git a/app/src/main/res/drawable/image7.jpg b/app/src/main/res/drawable/image7.jpg new file mode 100644 index 0000000..ea1c7f5 Binary files /dev/null and b/app/src/main/res/drawable/image7.jpg differ diff --git a/app/src/main/res/drawable/image8.png b/app/src/main/res/drawable/image8.png new file mode 100644 index 0000000..7631295 Binary files /dev/null and b/app/src/main/res/drawable/image8.png differ diff --git a/app/src/main/res/drawable/image9.png b/app/src/main/res/drawable/image9.png new file mode 100644 index 0000000..e00f4ec Binary files /dev/null and b/app/src/main/res/drawable/image9.png differ diff --git a/app/src/main/res/drawable/images/p1/main-foto.png b/app/src/main/res/drawable/images/p1/main-foto.png new file mode 100644 index 0000000..24fa6e6 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/main-foto.png differ diff --git a/app/src/main/res/drawable/images/p1/main-foto1.png b/app/src/main/res/drawable/images/p1/main-foto1.png new file mode 100644 index 0000000..9a7abdf Binary files /dev/null and b/app/src/main/res/drawable/images/p1/main-foto1.png differ diff --git a/app/src/main/res/drawable/images/p1/main-foto2.png b/app/src/main/res/drawable/images/p1/main-foto2.png new file mode 100644 index 0000000..e272fae Binary files /dev/null and b/app/src/main/res/drawable/images/p1/main-foto2.png differ diff --git a/app/src/main/res/drawable/images/p1/Гудбай, Америка.jpg b/app/src/main/res/drawable/images/p1/Гудбай, Америка.jpg new file mode 100644 index 0000000..68f7be4 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Гудбай, Америка.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Звёздная принцесса и силы зла.jpg b/app/src/main/res/drawable/images/p1/Звёздная принцесса и силы зла.jpg new file mode 100644 index 0000000..24e475c Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Звёздная принцесса и силы зла.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Команда котиков.jpg b/app/src/main/res/drawable/images/p1/Команда котиков.jpg new file mode 100644 index 0000000..8b671b9 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Команда котиков.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Молодой человек.jpg b/app/src/main/res/drawable/images/p1/Молодой человек.jpg new file mode 100644 index 0000000..53e0c40 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Молодой человек.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Ниндзяго Мастера кружицу.jpg b/app/src/main/res/drawable/images/p1/Ниндзяго Мастера кружицу.jpg new file mode 100644 index 0000000..7af5116 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Ниндзяго Мастера кружицу.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Семейка монстров.jpg b/app/src/main/res/drawable/images/p1/Семейка монстров.jpg new file mode 100644 index 0000000..89808b9 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Семейка монстров.jpg differ diff --git a/app/src/main/res/drawable/images/p1/Фиксики против кработов.jpg b/app/src/main/res/drawable/images/p1/Фиксики против кработов.jpg new file mode 100644 index 0000000..ea1c7f5 Binary files /dev/null and b/app/src/main/res/drawable/images/p1/Фиксики против кработов.jpg differ diff --git a/app/src/main/res/drawable/images/p2/2021/Город кошек.png b/app/src/main/res/drawable/images/p2/2021/Город кошек.png new file mode 100644 index 0000000..7631295 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Город кошек.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Зависнуть.png b/app/src/main/res/drawable/images/p2/2021/Зависнуть.png new file mode 100644 index 0000000..e00f4ec Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Зависнуть.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Звездные войны.png b/app/src/main/res/drawable/images/p2/2021/Звездные войны.png new file mode 100644 index 0000000..c925216 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Звездные войны.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Прекрасная эпоха.png b/app/src/main/res/drawable/images/p2/2021/Прекрасная эпоха.png new file mode 100644 index 0000000..b396d78 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Прекрасная эпоха.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Слоеный торт.png b/app/src/main/res/drawable/images/p2/2021/Слоеный торт.png new file mode 100644 index 0000000..530072c Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Слоеный торт.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Со мною вот что происходит.png b/app/src/main/res/drawable/images/p2/2021/Со мною вот что происходит.png new file mode 100644 index 0000000..2b7961e Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Со мною вот что происходит.png differ diff --git a/app/src/main/res/drawable/images/p2/2021/Таксист.png b/app/src/main/res/drawable/images/p2/2021/Таксист.png new file mode 100644 index 0000000..51306b5 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2021/Таксист.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Век Адалин.png b/app/src/main/res/drawable/images/p2/2022/Век Адалин.png new file mode 100644 index 0000000..9e0e94d Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Век Адалин.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Дело Коллини.png b/app/src/main/res/drawable/images/p2/2022/Дело Коллини.png new file mode 100644 index 0000000..2553f26 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Дело Коллини.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Легенды Орленка.png b/app/src/main/res/drawable/images/p2/2022/Легенды Орленка.png new file mode 100644 index 0000000..956d2b4 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Легенды Орленка.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Нормальный только я.png b/app/src/main/res/drawable/images/p2/2022/Нормальный только я.png new file mode 100644 index 0000000..23286a4 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Нормальный только я.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Притворись моей женой.png b/app/src/main/res/drawable/images/p2/2022/Притворись моей женой.png new file mode 100644 index 0000000..0067df0 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Притворись моей женой.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Холоп.png b/app/src/main/res/drawable/images/p2/2022/Холоп.png new file mode 100644 index 0000000..4916b38 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Холоп.png differ diff --git a/app/src/main/res/drawable/images/p2/2022/Экстрасенс.png b/app/src/main/res/drawable/images/p2/2022/Экстрасенс.png new file mode 100644 index 0000000..51d0137 Binary files /dev/null and b/app/src/main/res/drawable/images/p2/2022/Экстрасенс.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Любовь не понимает слов.png b/app/src/main/res/drawable/images/p3/2021/Любовь не понимает слов.png new file mode 100644 index 0000000..37f26ce Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Любовь не понимает слов.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Отчаянные домохозяйки.png b/app/src/main/res/drawable/images/p3/2021/Отчаянные домохозяйки.png new file mode 100644 index 0000000..887d56f Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Отчаянные домохозяйки.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Постучись в мою дверь.png b/app/src/main/res/drawable/images/p3/2021/Постучись в мою дверь.png new file mode 100644 index 0000000..ea2da6d Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Постучись в мою дверь.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Ранняя пташка.png b/app/src/main/res/drawable/images/p3/2021/Ранняя пташка.png new file mode 100644 index 0000000..7bca909 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Ранняя пташка.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Химера.png b/app/src/main/res/drawable/images/p3/2021/Химера.png new file mode 100644 index 0000000..60d5554 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Химера.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Черная любовь.png b/app/src/main/res/drawable/images/p3/2021/Черная любовь.png new file mode 100644 index 0000000..036ff04 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Черная любовь.png differ diff --git a/app/src/main/res/drawable/images/p3/2021/Эльбрус.png b/app/src/main/res/drawable/images/p3/2021/Эльбрус.png new file mode 100644 index 0000000..80506f1 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2021/Эльбрус.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Ветреный.png b/app/src/main/res/drawable/images/p3/2022/Ветреный.png new file mode 100644 index 0000000..60f5c5d Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Ветреный.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Дом дракона.png b/app/src/main/res/drawable/images/p3/2022/Дом дракона.png new file mode 100644 index 0000000..7f4e353 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Дом дракона.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Друзья.png b/app/src/main/res/drawable/images/p3/2022/Друзья.png new file mode 100644 index 0000000..fcb7bbe Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Друзья.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Любовь напрокат.png b/app/src/main/res/drawable/images/p3/2022/Любовь напрокат.png new file mode 100644 index 0000000..116da7f Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Любовь напрокат.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Новые сваты.png b/app/src/main/res/drawable/images/p3/2022/Новые сваты.png new file mode 100644 index 0000000..f91707e Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Новые сваты.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Сверхъестественное.png b/app/src/main/res/drawable/images/p3/2022/Сверхъестественное.png new file mode 100644 index 0000000..f561dcb Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Сверхъестественное.png differ diff --git a/app/src/main/res/drawable/images/p3/2022/Теория большого взрыва.png b/app/src/main/res/drawable/images/p3/2022/Теория большого взрыва.png new file mode 100644 index 0000000..89fa654 Binary files /dev/null and b/app/src/main/res/drawable/images/p3/2022/Теория большого взрыва.png differ diff --git a/app/src/main/res/drawable/images/p4/1.png b/app/src/main/res/drawable/images/p4/1.png new file mode 100644 index 0000000..4a7d8ae Binary files /dev/null and b/app/src/main/res/drawable/images/p4/1.png differ diff --git a/app/src/main/res/drawable/images/p4/2.png b/app/src/main/res/drawable/images/p4/2.png new file mode 100644 index 0000000..44fcb26 Binary files /dev/null and b/app/src/main/res/drawable/images/p4/2.png differ diff --git a/app/src/main/res/drawable/ivi.xml b/app/src/main/res/drawable/ivi.xml new file mode 100644 index 0000000..826ee2f --- /dev/null +++ b/app/src/main/res/drawable/ivi.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/round_home_work_24.xml b/app/src/main/res/drawable/round_home_work_24.xml new file mode 100644 index 0000000..0b7c2d7 --- /dev/null +++ b/app/src/main/res/drawable/round_home_work_24.xml @@ -0,0 +1,6 @@ + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..32526a0 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,18 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #0D0316 + #100e1b + #1d1b29 + #703E97 + #0D0316 + #0D0316 + #E3E3E3 + #595467 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..2a297b1 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,16 @@ + + WatchLinkApp + Название + Жанр + Год релиза + Длительность + Рейтинг + Описание + Режиссёр + Каталог + Каталог + Профиль + Поиск + Регистрация + Вход + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..2b57452 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +