commit 35fbf043856cd1b1ec48a0b5509bc2a73418724d Author: E41212133_Naufal Kadhafi <100177539+Jizzyyy@users.noreply.github.com> Date: Tue Feb 25 18:17:27 2025 +0700 Initial commit 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/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/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..b268ef3 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..0897082 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ 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..fdf8d99 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml new file mode 100644 index 0000000..5825e39 --- /dev/null +++ b/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..775eba8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/other.xml b/.idea/other.xml new file mode 100644 index 0000000..b8dd51e --- /dev/null +++ b/.idea/other.xml @@ -0,0 +1,461 @@ + + + + + + \ 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..5023cd2 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,73 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.jetbrains.kotlin.android) +} + +android { + namespace = "com.example.caloryapp" + compileSdk = 35 + + defaultConfig { + applicationId = "com.example.caloryapp" + minSdk = 24 + 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.5.1" + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +dependencies { + // library add + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.material) +// implementation (libs.ohteepee) + implementation (libs.ohteepee) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.ui.test.junit4) + debugImplementation(libs.androidx.ui.tooling) + debugImplementation(libs.androidx.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/caloryapp/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/caloryapp/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..8ca610f --- /dev/null +++ b/app/src/androidTest/java/com/example/caloryapp/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.caloryapp + +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.caloryapp", 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..64738b6 --- /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/caloryapp/MainActivity.kt b/app/src/main/java/com/example/caloryapp/MainActivity.kt new file mode 100644 index 0000000..058d1b0 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/MainActivity.kt @@ -0,0 +1,43 @@ +package com.example.caloryapp + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import com.example.caloryapp.pages.NavBarScreen +import com.example.caloryapp.ui.theme.CaloryAppTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + setContent { + CaloryAppTheme { + NavBarScreen() +// ChangePasswordScreen(navController = rememberNavController()) +// Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> +// Greeting( +// name = "Android", +// modifier = Modifier.padding(innerPadding) +// ) +// } + } + } + } +} + +//@Composable +//fun Greeting(name: String, modifier: Modifier = Modifier) { +// Text( +// text = "Hello $name!", +// modifier = modifier +// ) +//} +// +//@Preview(showBackground = true) +//@Composable +//fun GreetingPreview() { +// CaloryAppTheme { +// Greeting("Android") +// } +//} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/navigation/Navigation.kt b/app/src/main/java/com/example/caloryapp/navigation/Navigation.kt new file mode 100644 index 0000000..b4a484b --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/navigation/Navigation.kt @@ -0,0 +1,50 @@ +package com.example.caloryapp.navigation + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.rememberNavController +import com.example.caloryapp.pages.onboard.LoginScreen +import com.example.caloryapp.pages.NavBarScreen +import com.example.caloryapp.pages.onboard.ChangePasswordScreen +import com.example.caloryapp.pages.onboard.ForgotPasswordScreen +import com.example.caloryapp.pages.onboard.OTPVerificationScreen +import com.example.caloryapp.pages.onboard.OnBoardingScreen +import com.example.caloryapp.pages.onboard.SuccessChangePassword +import com.example.caloryapp.pages.onboard.SuccessRegister + +@Composable +fun Navigation(modifier: Modifier = Modifier) { + val navController = rememberNavController() + + NavHost( + navController = navController, + startDestination = NavigationScreen.OnBoardingScreen.name + ) { + composable(NavigationScreen.OnBoardingScreen.name) { + OnBoardingScreen(navController = navController) + } + composable(NavigationScreen.LoginScreen.name) { + LoginScreen(navController = navController) + } + composable(NavigationScreen.NavBarScreen.name) { + NavBarScreen() + } + composable(NavigationScreen.ForgotPasswordScreen.name) { + ForgotPasswordScreen(navController = navController) + } + composable(NavigationScreen.ChangePasswordScreen.name) { + ChangePasswordScreen(navController = navController) + } + composable(NavigationScreen.OTPVerificationScreen.name) { + OTPVerificationScreen(navController = navController) + } + composable(NavigationScreen.SuccessRegister.name) { + SuccessRegister(navController = navController) + } + composable(NavigationScreen.SuccessChangePassword.name) { + SuccessChangePassword(navController = navController) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/navigation/NavigationScreen.kt b/app/src/main/java/com/example/caloryapp/navigation/NavigationScreen.kt new file mode 100644 index 0000000..1d9df11 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/navigation/NavigationScreen.kt @@ -0,0 +1,30 @@ +package com.example.caloryapp.navigation + +enum class NavigationScreen { + OnBoardingScreen, + LoginScreen, + NavBarScreen, + HomeScreen, + ForgotPasswordScreen, + ChangePasswordScreen, + OTPVerificationScreen, + SuccessChangePassword, + SuccessRegister, + ProfileScreen; + + fun fromRoute(route: String): NavigationScreen = + when (route.substringBefore("/")) { + OnBoardingScreen.name -> OnBoardingScreen + LoginScreen.name -> LoginScreen + NavBarScreen.name -> NavBarScreen + HomeScreen.name -> HomeScreen + ProfileScreen.name -> ProfileScreen + ForgotPasswordScreen.name -> ForgotPasswordScreen + ChangePasswordScreen.name -> ChangePasswordScreen + OTPVerificationScreen.name -> OTPVerificationScreen + SuccessChangePassword.name -> SuccessChangePassword + SuccessRegister.name -> SuccessRegister + + else -> throw IllegalArgumentException("$route gagal bji") + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/NavBarScreen.kt b/app/src/main/java/com/example/caloryapp/pages/NavBarScreen.kt new file mode 100644 index 0000000..fe820a0 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/NavBarScreen.kt @@ -0,0 +1,139 @@ +package com.example.caloryapp.pages + +import android.annotation.SuppressLint +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.* +import androidx.compose.runtime.* +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.res.painterResource +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavHostController +import androidx.navigation.compose.* +import com.example.caloryapp.R +import com.example.caloryapp.pages.account.ProfileScreen +import com.example.caloryapp.pages.dashboard.HomeScreen +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary + +sealed class BottomNavigationScreen( + val title: String, + val filledIcon: Int, + val outlinedIcon: Int +) { + data object HomeScreen : + BottomNavigationScreen("Home", R.drawable.ic_home_filled, R.drawable.ic_home_outlined) + + data object ProfileScreen : + BottomNavigationScreen("Akun", R.drawable.ic_profile_filled, R.drawable.ic_profile_outlined) +} + +@SuppressLint("UnusedMaterialScaffoldPaddingParameter") +@Composable +fun NavBarScreen(modifier: Modifier = Modifier) { + val navController = rememberNavController() + val items = listOf( + BottomNavigationScreen.HomeScreen, + BottomNavigationScreen.ProfileScreen + ) + + Scaffold( + bottomBar = { CustomBottomNavigation(navController, items) }, + floatingActionButton = { + FloatingActionButton( + onClick = { /* TODO: Tambahkan aksi tombol scan */ }, + backgroundColor = Color(0xFF28A745), + contentColor = Color.White, + elevation = FloatingActionButtonDefaults.elevation(8.dp), + modifier = Modifier.size(64.dp) + ) { + Icon(painterResource(id = R.drawable.scan), contentDescription = "Scan") + } + }, + floatingActionButtonPosition = FabPosition.Center, + isFloatingActionButtonDocked = true, + content = { + NavHost( + navController = navController, + startDestination = BottomNavigationScreen.HomeScreen.title + ) { + composable(BottomNavigationScreen.HomeScreen.title) { + HomeScreen(navController = navController) + } + composable(BottomNavigationScreen.ProfileScreen.title) { + ProfileScreen(navController = navController) + } + } + } + ) +} + +@Composable +fun CustomBottomNavigation(navController: NavHostController, items: List) { + val navBackStackEntry by navController.currentBackStackEntryAsState() + val currentRoute = navBackStackEntry?.destination?.route + + Box( + modifier = Modifier + .fillMaxWidth() + .height(70.dp) + .background(Color.Transparent), + contentAlignment = Alignment.BottomCenter + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .height(64.dp) + .clip(RoundedCornerShape(topStart = 25.dp, topEnd = 25.dp)) + .background(Color.White), + contentAlignment = Alignment.Center + ) { + Row( + modifier = Modifier + .fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceAround + ) { + items.forEach { screen -> + val isSelected = currentRoute == screen.title + Column( + modifier = Modifier + .clickable( + onClick = { + navController.navigate(screen.title) { + popUpTo(navController.graph.startDestinationId) { + saveState = true + } + launchSingleTop = true + } + }, + indication = null, + interactionSource = remember { MutableInteractionSource() } + ), + horizontalAlignment = Alignment.CenterHorizontally + ) { + val iconId = if (isSelected) screen.filledIcon else screen.outlinedIcon + Icon( + painter = painterResource(id = iconId), + contentDescription = screen.title, + tint = if (isSelected) primary else Color.Gray, + modifier = Modifier.size(24.dp) + ) + Text( + text = screen.title, + color = if (isSelected) primary else Color.Gray, + fontSize = 14.sp, + fontFamily = bold + ) + } + } + } + } + } +} diff --git a/app/src/main/java/com/example/caloryapp/pages/account/ProfileDetailScreen.kt b/app/src/main/java/com/example/caloryapp/pages/account/ProfileDetailScreen.kt new file mode 100644 index 0000000..e9c7238 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/account/ProfileDetailScreen.kt @@ -0,0 +1,9 @@ +package com.example.caloryapp.pages.account + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@Composable +fun ProfileDetailScreen(modifier: Modifier = Modifier) { + +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/account/ProfileScreen.kt b/app/src/main/java/com/example/caloryapp/pages/account/ProfileScreen.kt new file mode 100644 index 0000000..aae2998 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/account/ProfileScreen.kt @@ -0,0 +1,186 @@ +package com.example.caloryapp.pages.account + +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.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.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.primarygrey +import com.example.caloryapp.ui.theme.primaryred +import com.example.caloryapp.widget.SimpleAlertDialog + +@Composable +fun ProfileScreen(modifier: Modifier = Modifier, navController: NavController) { + val openAlertDialog = remember { mutableStateOf(false) } + + Box( + modifier + .fillMaxSize() + .background(background) + ) { + Column(modifier.padding(horizontal = 25.dp, vertical = 40.dp)) { + Spacer(modifier.height(50.dp)) + androidx.compose.material.Text( + text = stringResource(R.string.akun), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(50.dp)) + Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + Image( + painter = painterResource(id = R.drawable.ic_profile_men), + contentDescription = null, + modifier = Modifier.size(80.dp) + ) + Spacer(modifier.width(20.dp)) + Column { + androidx.compose.material.Text( + text = "Naufal Kadhafi", + style = TextStyle( + fontSize = 23.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier = Modifier.height(5.dp)) + androidx.compose.material.Text( + text = "kadhafinaufal2@gmail.com", + style = TextStyle( + fontSize = 15.sp, + color = primarygrey, + fontFamily = bold + ) + ) + } + } + Spacer(modifier.height(60.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.SpaceBetween) { + Row { + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_profile), + contentDescription = null + ) + Spacer(modifier.width(25.dp)) + Text( + text = stringResource(R.string.profile), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_btn_detail), + contentDescription = null + ) + } + + Spacer(modifier.height(40.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.SpaceBetween) { + Row { + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_history), + contentDescription = null + ) + Spacer(modifier.width(25.dp)) + Text( + text = stringResource(R.string.riwayat), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_btn_detail), + contentDescription = null + ) + } + + Spacer(modifier.height(40.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.SpaceBetween) { + Row { + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_change_pw), + contentDescription = null + ) + Spacer(modifier.width(25.dp)) + Text( + text = stringResource(R.string.ubah_password), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_btn_detail), + contentDescription = null + ) + } + + Spacer(modifier.height(60.dp)) + Row(modifier.clickable { + openAlertDialog.value = true + }, verticalAlignment = Alignment.CenterVertically) { + Image( + imageVector = ImageVector.vectorResource(id = R.drawable.ic_log_out), + contentDescription = null + ) + Spacer(modifier.width(20.dp)) + Text( + text = stringResource(R.string.keluar), + style = TextStyle( + fontSize = 20.sp, + color = primaryred, + fontFamily = bold + ) + ) + } + if (openAlertDialog.value) { + SimpleAlertDialog( + dialogTitle = "Konfirmasi", + dialogSubTitle = "Apakah Anda yakin ingin keluar?", + onDismissRequest = { openAlertDialog.value = false }, + onConfirmation = { + openAlertDialog.value = false + // Tambahkan aksi logout di sini + } + ) + } + } + } +} diff --git a/app/src/main/java/com/example/caloryapp/pages/camera/CameraDetectionScreen.kt b/app/src/main/java/com/example/caloryapp/pages/camera/CameraDetectionScreen.kt new file mode 100644 index 0000000..0c57415 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/camera/CameraDetectionScreen.kt @@ -0,0 +1,10 @@ +package com.example.caloryapp.pages.camera + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.navigation.NavController + +@Composable +fun CameraDetectionScreen(modifier: Modifier = Modifier, navController: NavController) { + +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/dashboard/HomeScreen.kt b/app/src/main/java/com/example/caloryapp/pages/dashboard/HomeScreen.kt new file mode 100644 index 0000000..55acf6f --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/dashboard/HomeScreen.kt @@ -0,0 +1,91 @@ +package com.example.caloryapp.pages.dashboard + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +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.material.Divider +import androidx.compose.material3.Text +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.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.primarygrey +import com.example.caloryapp.widget.FilterBar + +@Composable +fun HomeScreen(modifier: Modifier = Modifier, navController: NavController) { + var selectedFilter by remember { mutableStateOf("Semua") } + + Box( + modifier + .fillMaxSize() + .background(background)) { + Column(modifier.padding(horizontal = 25.dp, vertical = 45.dp)) { + Spacer(modifier = Modifier.height(50.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.SpaceBetween,verticalAlignment = Alignment.CenterVertically) { + Image(painter = painterResource(id = R.drawable.ic_home_acc), contentDescription = null) + Row(verticalAlignment = Alignment.CenterVertically) { + Column(horizontalAlignment = Alignment.End) { + androidx.compose.material.Text( + text = "Naufal Kadhafi", + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + androidx.compose.material.Text( + text = "@kadhafiinl", + style = TextStyle( + fontSize = 14.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Spacer(modifier = Modifier.width(14.dp)) + Image(painter = painterResource(id = R.drawable.ic_profile_women), contentDescription = null, Modifier.size(45.dp)) + } + } + Spacer(modifier = Modifier.height(35.dp)) + Row(Modifier.width(215.dp)) { + Text( + text = "Hai Naufal, Bagaimana kabar kamu hari ini?", + style = TextStyle( + fontSize = 22.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Spacer(modifier = Modifier.height(15.dp)) + Divider(color = primary.copy(alpha = 0.2f), thickness = 3.dp) + Spacer(modifier = Modifier.height(15.dp)) + FilterBar(selectedFilter = selectedFilter, onFilterSelected = { selectedFilter = it}) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/ChangePasswordScreen.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/ChangePasswordScreen.kt new file mode 100644 index 0000000..9361023 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/ChangePasswordScreen.kt @@ -0,0 +1,108 @@ +package com.example.caloryapp.pages.onboard + +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.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Button +import androidx.compose.material3.Text +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.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.navigation.NavigationScreen +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.widget.CustomTextField + +@Composable +fun ChangePasswordScreen(modifier: Modifier = Modifier, navController: NavController) { + var newPassword by remember { mutableStateOf("") } + var confirmPassword by remember { mutableStateOf("") } + + Box( + Modifier + .fillMaxSize() + .background(background)) { + Column(Modifier.padding(horizontal = 25.dp, vertical = 50.dp)) { + Spacer(Modifier.height(45.dp)) + Row(Modifier.width(260.dp)) { + Text( + stringResource(R.string.buat_kata_sandi_baru), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + } + Spacer(modifier.height(42.dp)) + androidx.compose.material.Text( + text = stringResource(R.string.masukkan_kata_sandi), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(16.dp)) + CustomTextField( + value = newPassword, + onValueChange = { newPassword = it }, + placeholderText = "Masukkan Kata Sandi" + ) + Spacer(modifier.height(20.dp)) + androidx.compose.material.Text( + text = stringResource(R.string.konfirmasi_kata_sandi), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(16.dp)) + CustomTextField( + value = confirmPassword, + onValueChange = { confirmPassword = it }, + placeholderText = "Konfirmasi Kata Sandi" + ) + Spacer(modifier.height(45.dp)) + Button( + onClick = { navController.navigate(NavigationScreen.SuccessChangePassword.name) }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + androidx.compose.material.Text( + text = "Simpan", + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/ForgotPasswordScreen.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/ForgotPasswordScreen.kt new file mode 100644 index 0000000..b15b735 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/ForgotPasswordScreen.kt @@ -0,0 +1,106 @@ +package com.example.caloryapp.pages.onboard + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +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.material.Button +import androidx.compose.material3.Text +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.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.navigation.NavigationScreen +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.medium +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.widget.CustomTextField + +@Composable +fun ForgotPasswordScreen(modifier: Modifier = Modifier, navController: NavController) { + var gmail by remember { mutableStateOf("") } + + Box(Modifier.fillMaxSize()) { + Column(Modifier.padding(horizontal = 25.dp, vertical = 50.dp)) { + Spacer(Modifier.height(45.dp)) + Text( + text = stringResource(R.string.lupa_password2), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(Modifier.height(10.dp)) + Text( + text = stringResource(R.string.masukkan_gmail_kamu_nanti_akan_kita_kirimkan_kode_otp_ke_gmail_kamu_yaa), + style = TextStyle( + fontSize = 17.sp, + color = primaryblack, + fontFamily = medium + ) + ) + Spacer(modifier.height(50.dp)) + Image( + painter = painterResource(id = R.drawable.ic_forgot_pw), + contentDescription = null, + Modifier + .size(200.dp) + .align(Alignment.CenterHorizontally) + ) + Spacer(modifier.height(60.dp)) + androidx.compose.material.Text( + text = stringResource(R.string.masukkan_gmail), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(16.dp)) + CustomTextField( + value = gmail, + onValueChange = { gmail = it }, + placeholderText = stringResource(R.string.gmail) + ) + Spacer(modifier.height(40.dp)) + Button( + onClick = { navController.navigate(NavigationScreen.OTPVerificationScreen.name) }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + androidx.compose.material.Text( + text = stringResource(R.string.kirim_otp), + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/LoginScreen.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/LoginScreen.kt new file mode 100644 index 0000000..2f650ab --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/LoginScreen.kt @@ -0,0 +1,146 @@ +package com.example.caloryapp.pages.onboard + +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.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +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.material.Button +import androidx.compose.material.Text +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.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.navigation.NavigationScreen +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.blueunderlined +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.semibold +import com.example.caloryapp.widget.CustomTextField + +@Composable +fun LoginScreen(modifier: Modifier = Modifier, navController: NavController) { + var username by remember { mutableStateOf("") } + var password by remember { mutableStateOf("") } + + Box( + modifier + .fillMaxSize() + .background(background) + ) { + Column( + modifier.padding(horizontal = 25.dp, vertical = 50.dp) + ) { + Spacer(modifier.height(50.dp)) + Text( + text = stringResource(R.string.masuk), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(35.dp)) + Image( + painter = painterResource(id = R.drawable.image_onboard), + contentDescription = null, + Modifier + .size(200.dp) + .align(Alignment.CenterHorizontally) + ) + Spacer(modifier.height(35.dp)) + Text( + text = stringResource(R.string.username), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(16.dp)) + CustomTextField( + value = username, + onValueChange = { username = it }, + placeholderText = "Username" + ) + Spacer(modifier.height(16.dp)) + Text( + text = stringResource(R.string.password), + style = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier.height(16.dp)) + CustomTextField( + value = password, + onValueChange = { password = it }, + placeholderText = "Password" + ) + Spacer(modifier.height(18.dp)) + Row( + modifier + .align(Alignment.End) + .clickable { navController.navigate(NavigationScreen.ForgotPasswordScreen.name) }) { + Text( + text = stringResource(R.string.lupa_password), + style = TextStyle( + fontSize = 15.sp, + color = blueunderlined, + fontFamily = semibold, + textDecoration = TextDecoration.Underline + ) + ) + } + Spacer(modifier.height(35.dp)) + Button( + onClick = { navController.navigate(NavigationScreen.NavBarScreen.name) }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + Text( + text = stringResource(R.string.masuk), + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} + +//@Preview(showBackground = true) +//@Composable +//fun Preview(modifier: Modifier = Modifier) { +// LoginScreen(navController = rememberNavController()) +//} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/OTPVerificationScreen.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/OTPVerificationScreen.kt new file mode 100644 index 0000000..053d26f --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/OTPVerificationScreen.kt @@ -0,0 +1,99 @@ +package com.example.caloryapp.pages.onboard + +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.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.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Button +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.navigation.NavigationScreen +import com.example.caloryapp.ui.theme.blueunderlined +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.medium +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.semibold +import com.example.caloryapp.widget.OtpInput + +@Composable +fun OTPVerificationScreen(modifier: Modifier = Modifier, navController: NavController) { + Box(modifier.fillMaxSize()) { + Column(Modifier.padding(horizontal = 25.dp, vertical = 50.dp)) { + Spacer(Modifier.height(45.dp)) + Text( + stringResource(R.string.kode_otp), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(Modifier.height(10.dp)) + Text( + text = stringResource(R.string.masukkan_kode_otp_yang_sudah_dikirimkan_ke_gmail_kamu_yaa), + style = TextStyle( + fontSize = 17.sp, + color = primaryblack, + fontFamily = medium + ) + ) + Spacer(modifier.height(50.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.Center) { + OtpInput() + } + Spacer(modifier.height(18.dp)) + Row( + modifier + .fillMaxWidth() + .clickable { }, Arrangement.End) { + androidx.compose.material.Text( + text = stringResource(R.string.kirim_ulang_kode), + style = TextStyle( + fontSize = 16.sp, + color = blueunderlined, + fontFamily = semibold, + textDecoration = TextDecoration.Underline + ) + ) + } + Spacer(modifier.height(45.dp)) + Button( + onClick = { navController.navigate(NavigationScreen.ChangePasswordScreen.name) }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + androidx.compose.material.Text( + text = stringResource(R.string.verifikasi_otp), + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/OnBoardingScreen.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/OnBoardingScreen.kt new file mode 100644 index 0000000..b552c7b --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/OnBoardingScreen.kt @@ -0,0 +1,102 @@ +package com.example.caloryapp.pages.onboard + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +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.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.material.Button +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.navigation.NavigationScreen +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary + +@Composable +fun OnBoardingScreen(modifier: Modifier = Modifier, navController: NavController) { + Box(modifier.fillMaxSize()) { + Column( + modifier + .fillMaxSize() + .padding(horizontal = 25.dp, vertical = 40.dp) + ) { + Spacer(modifier.height(60.dp)) + Text( + text = stringResource(R.string.selamat_datang) + + stringResource(R.string.di_caloriey_app), + style = TextStyle( + fontSize = 35.sp, + color = primary, + fontFamily = bold + ) + ) + Spacer(modifier.height(80.dp)) + Image( + painter = painterResource(id = R.drawable.image_onboard), + contentDescription = null, + Modifier + .size(200.dp) + .align(Alignment.CenterHorizontally) + ) + Spacer(modifier.height(32.dp)) + Row(modifier.align(Alignment.CenterHorizontally)) { + Text( + text = "Lorem ipsum dolor sit amet consectetur. Feugiat pellentesque tellus feugiat tristique.", + style = TextStyle( + fontSize = 14.sp, + color = primary, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + Spacer(modifier.height(200.dp)) + Row( + modifier + .align(Alignment.CenterHorizontally) + ) { + Button( + onClick = { navController.navigate(NavigationScreen.LoginScreen.name) }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + Text( + text = stringResource(R.string.lanjut), + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } + } +} + +//@Preview(showBackground = true) +//@Composable +//fun Preview(modifier: Modifier = Modifier) { +// OnBoardingScreen(navController = rememberNavController()) +//} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessChangePassword.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessChangePassword.kt new file mode 100644 index 0000000..e8c76ed --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessChangePassword.kt @@ -0,0 +1,80 @@ +package com.example.caloryapp.pages.onboard + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +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.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Button +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack + +@Composable +fun SuccessChangePassword(modifier: Modifier = Modifier, navController: NavController) { + Box(modifier = Modifier + .fillMaxSize() + .background(background)) { + Column(Modifier.padding(horizontal = 25.dp, vertical = 50.dp)) { + Spacer(modifier = Modifier.height(50.dp)) + Text( + stringResource(R.string.password_kamu_berhasil_dibuat), + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier = Modifier.height(100.dp)) + Row(Modifier.fillMaxWidth(), Arrangement.Center) { + Image( + painter = painterResource(id = R.drawable.ic_success), + contentDescription = "" + ) + } + Spacer(modifier = Modifier.height(115.dp)) + Button( + onClick = { }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + androidx.compose.material.Text( + text = "Lanjut", + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessRegister.kt b/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessRegister.kt new file mode 100644 index 0000000..4d9e25a --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/pages/onboard/SuccessRegister.kt @@ -0,0 +1,70 @@ +package com.example.caloryapp.pages.onboard + +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.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Button +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.background +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack + +@Composable +fun SuccessRegister(modifier: Modifier = Modifier, navController: NavController) { + Box(modifier = Modifier + .fillMaxSize() + .background(background)) { + Column(Modifier.padding(horizontal = 25.dp, vertical = 50.dp)) { + Spacer(modifier = Modifier.height(50.dp)) + Text( + "Akun Kamu Berhasil Dibuat", + style = TextStyle( + fontSize = 35.sp, + color = primaryblack, + fontFamily = bold + ) + ) + Spacer(modifier = Modifier.height(100.dp)) + Image(imageVector = ImageVector.vectorResource(id = R.drawable.ic_success), contentDescription = "") + Spacer(modifier = Modifier.height(115.dp)) + Button( + onClick = { }, + modifier + .width(360.dp) + .height(50.dp), + colors = androidx.compose.material.ButtonDefaults.buttonColors(backgroundColor = primary), + shape = RoundedCornerShape(20.dp) + ) { + androidx.compose.material.Text( + text = "Lanjut", + style = TextStyle( + fontSize = 18.sp, + color = Color.White, + fontFamily = bold, + textAlign = TextAlign.Center + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/ui/theme/Color.kt b/app/src/main/java/com/example/caloryapp/ui/theme/Color.kt new file mode 100644 index 0000000..6d660ef --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/ui/theme/Color.kt @@ -0,0 +1,18 @@ +package com.example.caloryapp.ui.theme + +import androidx.compose.ui.graphics.Color + +var primary = Color(0xff109A17) +var primaryblack = Color(0xff202020) +var primarygrey = Color(0xffBABABA) +var background = Color(0xffF4F4F4) +var blueunderlined = Color(0xff0063BF) +var primaryred = Color(0xffE85454) + +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/caloryapp/ui/theme/Font.kt b/app/src/main/java/com/example/caloryapp/ui/theme/Font.kt new file mode 100644 index 0000000..743d966 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/ui/theme/Font.kt @@ -0,0 +1,10 @@ +package com.example.caloryapp.ui.theme + +import androidx.compose.ui.text.font.Font +import androidx.compose.ui.text.font.FontFamily +import com.example.caloryapp.R + +var bold = FontFamily(Font(R.font.sfpro_bold)) +var semibold = FontFamily(Font(R.font.sfpro_semibold)) +var medium = FontFamily(Font(R.font.sfpro_medium)) +var regular = FontFamily(Font(R.font.sfpro_regular)) \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/ui/theme/Theme.kt b/app/src/main/java/com/example/caloryapp/ui/theme/Theme.kt new file mode 100644 index 0000000..9053e43 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/ui/theme/Theme.kt @@ -0,0 +1,58 @@ +package com.example.caloryapp.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.ui.platform.LocalContext + +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 CaloryAppTheme( + 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 + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/ui/theme/Type.kt b/app/src/main/java/com/example/caloryapp/ui/theme/Type.kt new file mode 100644 index 0000000..287d856 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package com.example.caloryapp.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/java/com/example/caloryapp/widget/AlertDialogLogOut.kt b/app/src/main/java/com/example/caloryapp/widget/AlertDialogLogOut.kt new file mode 100644 index 0000000..0caeb8e --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/widget/AlertDialogLogOut.kt @@ -0,0 +1,87 @@ +package com.example.caloryapp.widget + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.window.DialogProperties +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.medium +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.primaryred +import com.example.caloryapp.ui.theme.semibold + +@Composable +fun SimpleAlertDialog( + dialogTitle: String, + dialogSubTitle: String, + onDismissRequest: () -> Unit, + onConfirmation: () -> Unit, +) { + AlertDialog( + modifier = Modifier.fillMaxWidth(0.92f), + properties = DialogProperties( + usePlatformDefaultWidth = false, + decorFitsSystemWindows = true, + dismissOnClickOutside = true, + dismissOnBackPress = true + ), + shape = RoundedCornerShape(20.dp), + onDismissRequest = { + onDismissRequest() + }, + confirmButton = { + TextButton(onClick = { onConfirmation() }) { + androidx.compose.material.Text( + text = stringResource(R.string.ya), + style = TextStyle( + fontSize = 18.sp, + color = primaryred, + fontFamily = semibold + ) + ) + } + }, + dismissButton = { + TextButton(onClick = { onDismissRequest() }) { + androidx.compose.material.Text( + text = stringResource(R.string.tidak), + style = TextStyle( + fontSize = 18.sp, + color = primaryblack, + fontFamily = semibold + ) + ) + } + }, + title = { + androidx.compose.material.Text( + text = dialogTitle, + style = TextStyle( + fontSize = 24.sp, + color = primaryblack, + fontFamily = bold + ) + ) + }, + text = { + androidx.compose.material.Text( + text = dialogSubTitle, + style = TextStyle( + fontSize = 18.sp, + color = primaryblack, + fontFamily = medium + ) + ) + }) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/widget/CustomTextField.kt b/app/src/main/java/com/example/caloryapp/widget/CustomTextField.kt new file mode 100644 index 0000000..8c7e45e --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/widget/CustomTextField.kt @@ -0,0 +1,54 @@ +package com.example.caloryapp.widget + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +//noinspection UsingMaterialAndMaterial3Libraries +import androidx.compose.material.OutlinedTextField +//noinspection UsingMaterialAndMaterial3Libraries +import androidx.compose.material.TextFieldDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.primarygrey + +@Composable +fun CustomTextField( + value: String, + onValueChange: (String) -> Unit, + placeholderText: String +) { + OutlinedTextField( + value = value, + onValueChange = onValueChange, + placeholder = { + androidx.compose.material.Text( + text = placeholderText, + style = TextStyle( + fontSize = 16.sp, + color = primarygrey, + fontFamily = bold + ) + ) + }, + modifier = Modifier + .fillMaxWidth() + .height(50.dp), + colors = TextFieldDefaults.outlinedTextFieldColors( + backgroundColor = Color(0xFFF8F8F8), // Warna putih dengan sedikit transparansi + focusedBorderColor = Color.Transparent, // Menghilangkan border saat fokus + unfocusedBorderColor = Color.Transparent, // Menghilangkan border saat tidak fokus + cursorColor = Color.Black // Warna kursor + ), + shape = RoundedCornerShape(8.dp) // Membuat border melengkung + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/example/caloryapp/widget/FilterBar.kt b/app/src/main/java/com/example/caloryapp/widget/FilterBar.kt new file mode 100644 index 0000000..260dc79 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/widget/FilterBar.kt @@ -0,0 +1,84 @@ +package com.example.caloryapp.widget + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.layout.Arrangement +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.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Text +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.res.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.example.caloryapp.R +import com.example.caloryapp.ui.theme.bold +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.semibold + +@Composable +fun FilterBar( + selectedFilter: String, + onFilterSelected: (String) -> Unit +) { + val filters = listOf("Semua", "Hari ini", "Minggu Ini", "Bulan Ini") + val scrollState = rememberScrollState() + + Row( + modifier = Modifier + .fillMaxWidth() + .horizontalScroll(scrollState), + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + filters.forEach { filter -> + FilterButton( + text = filter, + isSelected = filter == selectedFilter, + onClick = { onFilterSelected(filter) } + ) + } + } +} + +@Composable +fun FilterButton( + text: String, + isSelected: Boolean, + onClick: () -> Unit +) { + val backgroundColor = if (isSelected) primary.copy(alpha = 0.6f) else Color.White + val textColor = if (isSelected) Color.White else primary.copy(alpha = 0.6f) + + Box( + modifier = Modifier + .clip(RoundedCornerShape(20.dp)) + .background(backgroundColor) + .width(100.dp) + .clickable { onClick() } + .padding(horizontal = 16.dp, vertical = 8.dp), + contentAlignment = Alignment.Center + ) { + androidx.compose.material.Text( + text = text, + style = TextStyle( + fontSize = 15.sp, + color = textColor, + fontFamily = bold, + letterSpacing = 0.2.sp + ) + ) + } +} diff --git a/app/src/main/java/com/example/caloryapp/widget/OTPInputField.kt b/app/src/main/java/com/example/caloryapp/widget/OTPInputField.kt new file mode 100644 index 0000000..dfe1143 --- /dev/null +++ b/app/src/main/java/com/example/caloryapp/widget/OTPInputField.kt @@ -0,0 +1,80 @@ +package com.example.caloryapp.widget + +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +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.text.TextStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.composeuisuite.ohteepee.OhTeePeeInput +import com.composeuisuite.ohteepee.configuration.OhTeePeeCellConfiguration +import com.composeuisuite.ohteepee.configuration.OhTeePeeConfigurations +import com.example.caloryapp.ui.theme.primary +import com.example.caloryapp.ui.theme.primaryblack +import com.example.caloryapp.ui.theme.primarygrey +import com.example.caloryapp.ui.theme.primaryred +import com.example.caloryapp.ui.theme.semibold + +enum class OtpState { Loading, Error, None } + +@Composable +fun OtpInput() { + // a mutable state to handle OTP value changes… + var otpValue: String by remember { mutableStateOf("") } + var state: OtpState by remember { + mutableStateOf(OtpState.None) + } + + // this config will be used for each cell + val defaultCellConfig = OhTeePeeCellConfiguration.withDefaults( + borderColor = primarygrey, + borderWidth = 1.dp, + shape = RoundedCornerShape(16.dp), + textStyle = TextStyle( + fontSize = 20.sp, + color = primaryblack, + fontFamily = semibold + ) + ) + + OhTeePeeInput( + value = otpValue, + onValueChange = { newValue, isValid -> + otpValue = newValue + + if (isValid) { + state = OtpState.Loading + // Send a request to validate the value here... +// vm.validateOtp(otpValue) + } else { + // Reset the state when user enters (to remove the error state) + state = OtpState.None + } + + }, + configurations = OhTeePeeConfigurations.withDefaults( + cellsCount = 4, + emptyCellConfig = defaultCellConfig, + activeCellConfig = defaultCellConfig.copy( + borderColor = primary, + borderWidth = 1.dp + ), + errorCellConfig = defaultCellConfig.copy( + borderColor = primaryred, + borderWidth = 1.dp + ), + cellModifier = Modifier + .padding(horizontal = 10.dp) + .size(60.dp), + placeHolder = "-", + ), + ) +} + + diff --git a/app/src/main/res/drawable/ic_btn_detail.xml b/app/src/main/res/drawable/ic_btn_detail.xml new file mode 100644 index 0000000..e019f92 --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_detail.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_change_pw.xml b/app/src/main/res/drawable/ic_change_pw.xml new file mode 100644 index 0000000..58afd26 --- /dev/null +++ b/app/src/main/res/drawable/ic_change_pw.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_forgot_pw.png b/app/src/main/res/drawable/ic_forgot_pw.png new file mode 100644 index 0000000..a43c921 Binary files /dev/null and b/app/src/main/res/drawable/ic_forgot_pw.png differ diff --git a/app/src/main/res/drawable/ic_history.xml b/app/src/main/res/drawable/ic_history.xml new file mode 100644 index 0000000..9446444 --- /dev/null +++ b/app/src/main/res/drawable/ic_history.xml @@ -0,0 +1,20 @@ + + + + diff --git a/app/src/main/res/drawable/ic_home_acc.png b/app/src/main/res/drawable/ic_home_acc.png new file mode 100644 index 0000000..0e91cc2 Binary files /dev/null and b/app/src/main/res/drawable/ic_home_acc.png differ diff --git a/app/src/main/res/drawable/ic_home_filled.xml b/app/src/main/res/drawable/ic_home_filled.xml new file mode 100644 index 0000000..e8e5aa6 --- /dev/null +++ b/app/src/main/res/drawable/ic_home_filled.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_home_outlined.xml b/app/src/main/res/drawable/ic_home_outlined.xml new file mode 100644 index 0000000..779f02c --- /dev/null +++ b/app/src/main/res/drawable/ic_home_outlined.xml @@ -0,0 +1,17 @@ + + + + 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/ic_log_out.xml b/app/src/main/res/drawable/ic_log_out.xml new file mode 100644 index 0000000..4cc71b2 --- /dev/null +++ b/app/src/main/res/drawable/ic_log_out.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_otp.png b/app/src/main/res/drawable/ic_otp.png new file mode 100644 index 0000000..7ee0ac6 Binary files /dev/null and b/app/src/main/res/drawable/ic_otp.png differ diff --git a/app/src/main/res/drawable/ic_profile.xml b/app/src/main/res/drawable/ic_profile.xml new file mode 100644 index 0000000..780e937 --- /dev/null +++ b/app/src/main/res/drawable/ic_profile.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable/ic_profile_filled.xml b/app/src/main/res/drawable/ic_profile_filled.xml new file mode 100644 index 0000000..8143fa7 --- /dev/null +++ b/app/src/main/res/drawable/ic_profile_filled.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_profile_men.png b/app/src/main/res/drawable/ic_profile_men.png new file mode 100644 index 0000000..36d3900 Binary files /dev/null and b/app/src/main/res/drawable/ic_profile_men.png differ diff --git a/app/src/main/res/drawable/ic_profile_outlined.xml b/app/src/main/res/drawable/ic_profile_outlined.xml new file mode 100644 index 0000000..c7e73c4 --- /dev/null +++ b/app/src/main/res/drawable/ic_profile_outlined.xml @@ -0,0 +1,17 @@ + + + + diff --git a/app/src/main/res/drawable/ic_profile_women.png b/app/src/main/res/drawable/ic_profile_women.png new file mode 100644 index 0000000..655f69b Binary files /dev/null and b/app/src/main/res/drawable/ic_profile_women.png differ diff --git a/app/src/main/res/drawable/ic_scan.png b/app/src/main/res/drawable/ic_scan.png new file mode 100644 index 0000000..629d59c Binary files /dev/null and b/app/src/main/res/drawable/ic_scan.png differ diff --git a/app/src/main/res/drawable/ic_success.png b/app/src/main/res/drawable/ic_success.png new file mode 100644 index 0000000..e44a8a0 Binary files /dev/null and b/app/src/main/res/drawable/ic_success.png differ diff --git a/app/src/main/res/drawable/image_onboard.png b/app/src/main/res/drawable/image_onboard.png new file mode 100644 index 0000000..fd85465 Binary files /dev/null and b/app/src/main/res/drawable/image_onboard.png differ diff --git a/app/src/main/res/drawable/scan.xml b/app/src/main/res/drawable/scan.xml new file mode 100644 index 0000000..d665b80 --- /dev/null +++ b/app/src/main/res/drawable/scan.xml @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/app/src/main/res/font/sfpro_bold.ttf b/app/src/main/res/font/sfpro_bold.ttf new file mode 100644 index 0000000..8dbc526 Binary files /dev/null and b/app/src/main/res/font/sfpro_bold.ttf differ diff --git a/app/src/main/res/font/sfpro_medium.ttf b/app/src/main/res/font/sfpro_medium.ttf new file mode 100644 index 0000000..dd8fa1b Binary files /dev/null and b/app/src/main/res/font/sfpro_medium.ttf differ diff --git a/app/src/main/res/font/sfpro_regular.ttf b/app/src/main/res/font/sfpro_regular.ttf new file mode 100644 index 0000000..b3d6dff Binary files /dev/null and b/app/src/main/res/font/sfpro_regular.ttf differ diff --git a/app/src/main/res/font/sfpro_semibold.ttf b/app/src/main/res/font/sfpro_semibold.ttf new file mode 100644 index 0000000..5dd96f9 Binary files /dev/null and b/app/src/main/res/font/sfpro_semibold.ttf 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..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #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..c5141b6 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,31 @@ + + CaloryApp + di Caloriey App + Selamat Datang\n + Lanjut + Masuk + Username + Password + Lupa Password + Akun + Profile + Riwayat + Ubah Password + Keluar + Ya + Tidak + Konfirmasi + Lupa Password? + Masukkan gmail kamu, nanti akan kita kirimkan kode OTP ke gmail kamu yaa! + Masukkan Gmail + Gmail + Kirim OTP + Kode OTP + Masukkan Kode OTP yang sudah dikirimkan ke gmail kamu yaa! + Kirim Ulang Kode + Buat Kata Sandi Baru + Masukkan Kata Sandi + Konfirmasi Kata Sandi + Verifikasi OTP + Password Kamu Berhasil Dibuat + \ 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..704df8d --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +