commit 895ee0fe2b8335accd4621a492f891aea9269786 Author: ityurner02@mail.ru Date: Sat Oct 14 19:51:04 2023 +0400 2 lab diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -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 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..b3405b3 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +My Application \ 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..189f4c8 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ 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..5b9e049 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,67 @@ +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "com.example.myapplication" + compileSdk = 33 + + defaultConfig { + applicationId = "com.example.myapplication" + minSdk = 24 + 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("androidx.core:core-ktx:1.9.0") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") + implementation("androidx.activity:activity-compose:1.7.0") + implementation(platform("androidx.compose:compose-bom:2023.03.00")) + implementation("androidx.navigation:navigation-compose:2.6.0") + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.ui:ui-graphics") + implementation("androidx.compose.ui:ui-tooling-preview") + implementation("androidx.compose.material3:material3") + 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.03.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/myapplication/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..e9283cf --- /dev/null +++ b/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.myapplication + +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.myapplication", 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..e013846 --- /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/myapplication/MainActivity.kt b/app/src/main/java/com/example/myapplication/MainActivity.kt new file mode 100644 index 0000000..10c5f08 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/MainActivity.kt @@ -0,0 +1,43 @@ +package com.example.myapplication + +import android.content.res.Configuration +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import com.example.myapplication.composeui.navigation.MainNavbar +import com.example.myapplication.ui.theme.MyApplicationTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + MyApplicationTheme { + Surface( + modifier = Modifier.fillMaxSize(), + color = MaterialTheme.colorScheme.background + ) { + MainNavbar() + } + } + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun MainNavbarPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + MainNavbar() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/book/model/Book.kt b/app/src/main/java/com/example/myapplication/book/model/Book.kt new file mode 100644 index 0000000..26677a3 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/book/model/Book.kt @@ -0,0 +1,18 @@ +package com.example.myapplication.book.model + +import java.io.Serializable +import com.example.myapplication.R + +data class Book( + val title: String, + val author: String, + val content: String +) : Serializable + +fun getBooks(): List { + return listOf( + Book("1984", "Дж. Оруэлл", "Был холодный ясный апрельский день, и часы пробили тринадцать."), + Book("Собачье сердце", "М.А. Булгаков", "У‑у-у-у-у-гу-гуг-гуу! О, гляньте на меня, я погибаю."), + Book("Вельд", "Р. Брэдбери", "— Джорджи, пожалуйста, посмотри детскую комнату. — А что с ней?") + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/BookView.kt b/app/src/main/java/com/example/myapplication/composeui/BookView.kt new file mode 100644 index 0000000..1d68c84 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/BookView.kt @@ -0,0 +1,62 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.example.myapplication.R +import com.example.myapplication.book.model.getBooks +import com.example.myapplication.ui.theme.MyApplicationTheme + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun BookView(id: Int) { + val book = getBooks()[id] + Column( + Modifier + .fillMaxWidth() + .padding(all = 10.dp) + ) { + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = book.title, onValueChange = {}, readOnly = true, + label = { + Text(stringResource(id = R.string.book_title)) + } + ) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = book.author, onValueChange = {}, readOnly = true, + label = { + Text(stringResource(id = R.string.author_name)) + } + ) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = book.content, onValueChange = {}, readOnly = true, + label = { + Text(stringResource(id = R.string.all_content)) + } + ) + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun BookViewPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + BookView(id = 0) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Catalog.kt b/app/src/main/java/com/example/myapplication/composeui/Catalog.kt new file mode 100644 index 0000000..51ceee0 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Catalog.kt @@ -0,0 +1,58 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import com.example.myapplication.R +import com.example.myapplication.book.model.getBooks +import com.example.myapplication.composeui.navigation.Screen +import com.example.myapplication.ui.theme.MyApplicationTheme + +@Composable +fun Catalog(navController: NavController?) { + Column(Modifier.padding(all = 10.dp)) { + getBooks().forEachIndexed() { index, book -> + val bookId = Screen.BookView.route.replace("{id}", index.toString()) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(bookId) }) { + Text("${book.title}") + } + } + Spacer(Modifier.padding(bottom = 40.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(Screen.Loader.route) }) { + Text(stringResource(id = R.string.add_book)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun CatalogPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Catalog(navController = null) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Enter.kt b/app/src/main/java/com/example/myapplication/composeui/Enter.kt new file mode 100644 index 0000000..81c2ad4 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Enter.kt @@ -0,0 +1,63 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import com.example.myapplication.R +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import com.example.myapplication.composeui.navigation.Screen +import com.example.myapplication.ui.theme.MyApplicationTheme + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Enter(navController: NavController?) { + Column(Modifier.fillMaxWidth().padding(all = 40.dp)) { + val loginStr = remember{mutableStateOf("")} + Text(stringResource(id = R.string.login)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = loginStr.value, onValueChange = { newText -> loginStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 10.dp)) + val passwordStr = remember{mutableStateOf("")} + Text(stringResource(id = R.string.password)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = passwordStr.value, onValueChange = { newText -> passwordStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 20.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(Screen.Profile.route) }) { + Text(stringResource(id = R.string.enter)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun EnterPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Enter(navController = null) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Loader.kt b/app/src/main/java/com/example/myapplication/composeui/Loader.kt new file mode 100644 index 0000000..254c3de --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Loader.kt @@ -0,0 +1,67 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.example.myapplication.R +import androidx.compose.foundation.BorderStroke +import androidx.compose.material3.ButtonDefaults +import com.example.myapplication.ui.theme.MyApplicationTheme + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Loader() { + Column(Modifier.fillMaxWidth().padding(all = 40.dp)) { + Text(stringResource(id = R.string.help_me_pls)) + Spacer(Modifier.padding(bottom = 20.dp)) + val titleStr = remember{ mutableStateOf("") } + Text(stringResource(id = R.string.book_title)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = titleStr.value, onValueChange = { newText -> titleStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 10.dp)) + val authorStr = remember{ mutableStateOf("") } + Text(stringResource(id = R.string.author_name)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = authorStr.value, onValueChange = { newText -> authorStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 20.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = {}, colors = ButtonDefaults.buttonColors(containerColor = Color.LightGray, contentColor = Color.Black), + border = BorderStroke(3.dp, Color.DarkGray)) { + Text(stringResource(id = R.string.load_book)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun LoaderPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Loader() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Main.kt b/app/src/main/java/com/example/myapplication/composeui/Main.kt new file mode 100644 index 0000000..6396ec8 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Main.kt @@ -0,0 +1,70 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.material3.Button +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import com.example.myapplication.composeui.navigation.Screen +import com.example.myapplication.ui.theme.MyApplicationTheme +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.unit.sp +import com.example.myapplication.R +import androidx.compose.ui.layout.ContentScale + +@Composable +fun Main(navController: NavController?) { + Column(Modifier.padding(all = 40.dp)) { + Text(stringResource(id = R.string.welcome), modifier = Modifier.fillMaxWidth(), fontSize = 24.sp, textAlign = TextAlign.Center) + Spacer(Modifier.padding(bottom = 20.dp)) + Image( + painter = painterResource(id = R.drawable.logo), + contentDescription = "logo", + contentScale = ContentScale.FillWidth, + modifier = Modifier.fillMaxWidth(), + ) + Spacer(Modifier.padding(bottom = 20.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(Screen.Enter.route) }) { + Text(stringResource(id = R.string.enter)) + } + Spacer(Modifier.padding(bottom = 20.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(Screen.Registration.route) }) { + Text(stringResource(id = R.string.create_acc)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun MainPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Main(navController = null) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Profile.kt b/app/src/main/java/com/example/myapplication/composeui/Profile.kt new file mode 100644 index 0000000..3b1f6be --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Profile.kt @@ -0,0 +1,35 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.example.myapplication.R +import com.example.myapplication.ui.theme.MyApplicationTheme + +@Composable +fun Profile() { + Column(Modifier.padding(all = 40.dp)) { + Text(stringResource(id = R.string.stats)) + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun ProfilePreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Profile() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Registration.kt b/app/src/main/java/com/example/myapplication/composeui/Registration.kt new file mode 100644 index 0000000..c8ac77b --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Registration.kt @@ -0,0 +1,69 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Button +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.navigation.NavController +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import com.example.myapplication.composeui.navigation.Screen +import com.example.myapplication.ui.theme.MyApplicationTheme +import com.example.myapplication.R + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Registration(navController: NavController?) { + Column(Modifier.fillMaxWidth().padding(all = 40.dp)) { + val mailStr = remember{mutableStateOf("")} + Text(stringResource(id = R.string.email)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = mailStr.value, onValueChange = { newText -> mailStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 10.dp)) + val loginStr = remember{mutableStateOf("")} + Text(stringResource(id = R.string.login)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = loginStr.value, onValueChange = { newText -> loginStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 10.dp)) + val passwordStr = remember{mutableStateOf("")} + Text(stringResource(id = R.string.password)) + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = passwordStr.value, onValueChange = { newText -> passwordStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 20.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = { navController?.navigate(Screen.Enter.route) }) { + Text(stringResource(id = R.string.create_acc)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun RegistrationPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Registration(navController = null) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/Search.kt b/app/src/main/java/com/example/myapplication/composeui/Search.kt new file mode 100644 index 0000000..59b1279 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/Search.kt @@ -0,0 +1,66 @@ +package com.example.myapplication.composeui + +import android.content.res.Configuration +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.colorResource +import com.example.myapplication.R +import com.example.myapplication.ui.theme.MyApplicationTheme + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Search() { + Column( + Modifier + .fillMaxWidth() + .padding(all = 40.dp)) { + Column(Modifier.background(color = colorResource(R.color.green_200)).padding(all = 20.dp)) { + Text(stringResource(id = R.string.welcome), color = Color.White) + Text(stringResource(id = R.string.book_world), color = Color.White) + } + Spacer(Modifier.padding(bottom = 20.dp)) + val searchStr = remember{ mutableStateOf("") } + OutlinedTextField(modifier = Modifier.fillMaxWidth(), + value = searchStr.value, onValueChange = { newText -> searchStr.value = newText }, + ) + Spacer(Modifier.padding(bottom = 10.dp)) + Button( + modifier = Modifier + .fillMaxWidth() + .padding(all = 10.dp), + onClick = {}) { + Text(stringResource(id = R.string.search_book)) + } + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun SearchPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + Search() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/navigation/MainNavbar.kt b/app/src/main/java/com/example/myapplication/composeui/navigation/MainNavbar.kt new file mode 100644 index 0000000..8904e0d --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/navigation/MainNavbar.kt @@ -0,0 +1,162 @@ +package com.example.myapplication.composeui.navigation + +import android.content.res.Configuration +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.padding +import androidx.compose.material.icons.Icons +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.Scaffold +import androidx.compose.material3.Surface +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.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +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.myapplication.ui.theme.MyApplicationTheme +import com.example.myapplication.R +import com.example.myapplication.composeui.Main +import com.example.myapplication.composeui.Registration +import com.example.myapplication.composeui.Enter +import com.example.myapplication.composeui.Profile +import com.example.myapplication.composeui.Search +import com.example.myapplication.composeui.Loader +import com.example.myapplication.composeui.Catalog +import com.example.myapplication.composeui.BookView + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Topbar( + navController: NavHostController, + currentScreen: Screen? +) { + TopAppBar( + colors = TopAppBarDefaults.smallTopAppBarColors( + containerColor = MaterialTheme.colorScheme.primary, + titleContentColor = MaterialTheme.colorScheme.onPrimary, + ), + title = { + Text(stringResource(currentScreen?.resourceId ?: R.string.app_name)) + }, + navigationIcon = { + if ( + navController.previousBackStackEntry != null + && (currentScreen == null || !currentScreen.showInBottomBar) + ) { + IconButton(onClick = { navController.navigateUp() }) { + Icon( + imageVector = Icons.Filled.ArrowBack, + contentDescription = null, + tint = MaterialTheme.colorScheme.onPrimary + ) + } + } + } + ) +} + +@Composable +fun Navbar( + navController: NavHostController, + currentDestination: NavDestination?, + modifier: Modifier = Modifier +) { + NavigationBar(modifier) { + Screen.bottomBarItems.forEach { screen -> + NavigationBarItem( + icon = { Icon(screen.icon, contentDescription = null) }, + label = { Text(stringResource(screen.resourceId)) }, + selected = currentDestination?.hierarchy?.any { it.route == screen.route } == true, + onClick = { + navController.navigate(screen.route) { + popUpTo(navController.graph.findStartDestination().id) { + saveState = true + } + launchSingleTop = true + restoreState = true + } + } + ) + } + } +} + +@Composable +fun Navhost( + navController: NavHostController, + innerPadding: PaddingValues, modifier: + Modifier = Modifier +) { + NavHost( + navController, + startDestination = Screen.Main.route, + modifier.padding(innerPadding) + ) { + composable(Screen.Main.route) { Main(navController) } + composable(Screen.Registration.route) { Registration(navController) } + composable(Screen.Enter.route) { Enter(navController) } + composable(Screen.Profile.route) { Profile() } + composable(Screen.Search.route) { Search() } + composable(Screen.Loader.route) { Loader() } + composable(Screen.Catalog.route) { Catalog(navController) } + composable( + Screen.BookView.route, + arguments = listOf(navArgument("id") { type = NavType.IntType }) + ) { backStackEntry -> + backStackEntry.arguments?.let { BookView(it.getInt("id")) } + } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun MainNavbar() { + val navController = rememberNavController() + val navBackStackEntry by navController.currentBackStackEntryAsState() + val currentDestination = navBackStackEntry?.destination + val currentScreen = currentDestination?.route?.let { Screen.getItem(it) } + + Scaffold( + topBar = { + Topbar(navController, currentScreen) + }, + bottomBar = { + if (currentScreen == null || currentScreen.showInBottomBar) { + Navbar(navController, currentDestination) + } + } + ) { innerPadding -> + Navhost(navController, innerPadding) + } +} + +@Preview(name = "Light Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Dark Mode", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +fun MainNavbarPreview() { + MyApplicationTheme { + Surface( + color = MaterialTheme.colorScheme.background + ) { + MainNavbar() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/composeui/navigation/Screen.kt b/app/src/main/java/com/example/myapplication/composeui/navigation/Screen.kt new file mode 100644 index 0000000..7b17e95 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/composeui/navigation/Screen.kt @@ -0,0 +1,54 @@ +package com.example.myapplication.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.List +import androidx.compose.material.icons.filled.Search +import androidx.compose.ui.graphics.vector.ImageVector +import com.example.myapplication.R + +enum class Screen( + val route: String, + @StringRes val resourceId: Int, + val icon: ImageVector = Icons.Filled.Favorite, + val showInBottomBar: Boolean = true +) { + Main( + "main", R.string.main_title, showInBottomBar = false + ), + Registration( + "registration", R.string.registration_title, showInBottomBar = false + ), + Enter( + "enter", R.string.enter_title, showInBottomBar = false + ), + Profile( + "profile", R.string.profile, Icons.Filled.AccountCircle + ), + Search( + "search", R.string.search, Icons.Filled.Search + ), + Catalog( + "catalog", R.string.catalog, Icons.Filled.List + ), + Loader( + "loader", R.string.loader, showInBottomBar = false + ), + BookView( + "book-view/{id}", R.string.book_view_title, showInBottomBar = false + ); + + companion object { + val bottomBarItems = listOf( + Profile, + Search, + Catalog, + ) + 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/myapplication/ui/theme/Color.kt b/app/src/main/java/com/example/myapplication/ui/theme/Color.kt new file mode 100644 index 0000000..dc64ba1 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package com.example.myapplication.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Green = Color(0xFF07B618) +val Grey = Color(0xFF686769) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/ui/theme/Theme.kt b/app/src/main/java/com/example/myapplication/ui/theme/Theme.kt new file mode 100644 index 0000000..ffb65c5 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/ui/theme/Theme.kt @@ -0,0 +1,71 @@ +package com.example.myapplication.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.graphics.Color +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 = Green, + secondary = Grey, + tertiary = Pink40, + + // Other default colors to override + background = Color(0xFFD8E2F1), + surface = Color(0xFFFFFBFE), + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Color(0xFF1C1B1F), + onSurface = Color(0xFF1C1B1F), + +) + +@Composable +fun MyApplicationTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + // Dynamic color is available on Android 12+ + dynamicColor: Boolean = false, + 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/myapplication/ui/theme/Type.kt b/app/src/main/java/com/example/myapplication/ui/theme/Type.kt new file mode 100644 index 0000000..924c485 --- /dev/null +++ b/app/src/main/java/com/example/myapplication/ui/theme/Type.kt @@ -0,0 +1,33 @@ +package com.example.myapplication.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 = 20.sp, + lineHeight = 28.sp, + letterSpacing = 0.5.sp + ), + //Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 32.sp, + lineHeight = 40.sp, + letterSpacing = 0.sp + ), + labelLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 20.sp, + lineHeight = 28.sp, + letterSpacing = 0.5.sp + ) +) \ No newline at end of file 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/logo.png b/app/src/main/res/drawable/logo.png new file mode 100644 index 0000000..2f1515a Binary files /dev/null and b/app/src/main/res/drawable/logo.png differ 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-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..99bbc41 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,11 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF07B618 + #FF000000 + #FFFFFFFF + \ 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..acb01fe --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,37 @@ + + My Application + +

TurnerLibrary

+
+ Регистрация + Вход + Профиль + Поиск + Загрузка + Каталог + Книга + Войти + Создать аккаунт + Почта + Логин + Пароль + +

Пользователь

\n +

User1

\n\n +

Дата регистрации

\n +

20.09.2023

\n\n +

Прочитано книг

\n +

7

\n\n +

Загружено книг

\n +

0

+
+ Название + Автор + Содержание + Добро пожаловать + в мир книг! + Найти + Загрузить + Добавить + Вы можете помочь нашей библиотеке, загрузив свою книгу. +
\ 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..e48770a --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +