From 31cd0d34fbbceb32f18c850fd6eceafb259b53b3 Mon Sep 17 00:00:00 2001 From: starry-shivam Date: Mon, 8 Apr 2024 12:40:28 +0530 Subject: [PATCH] Fix propagations of Experimental APIs Signed-off-by: starry-shivam --- .../com/starry/greenstash/MainActivity.kt | 12 ------ .../com/starry/greenstash/MainViewModel.kt | 13 +------ .../greenstash/reminder/ReminderManager.kt | 12 ------ .../reminder/ReminderNotificationSender.kt | 12 ------ .../reminder/receivers/AlarmReceiver.kt | 13 +------ .../receivers/ReminderDepositReceiver.kt | 13 +------ .../receivers/ReminderDismissReceiver.kt | 13 +------ .../greenstash/ui/common/CurrencyPicker.kt | 3 +- .../greenstash/ui/common/ExpandableCard.kt | 21 +++++++--- .../greenstash/ui/navigation/NavGraph.kt | 17 ++------- .../ui/screens/backups/BackupScreen.kt | 2 +- .../composables/DWScreen.kt | 5 ++- .../viewmodels/InputViewModel.kt | 15 +------- .../ui/screens/home/composables/GoalItems.kt | 2 +- .../screens/home/composables/GoalLazyItem.kt | 13 +------ .../screens/home/composables/HomeAppBars.kt | 7 ++-- .../screens/home/composables/HomeDialogs.kt | 3 +- .../ui/screens/home/composables/HomeScreen.kt | 38 +++++-------------- .../screens/home/viewmodels/HomeViewModel.kt | 13 +------ .../info/composables/EditTransactionSheet.kt | 2 +- .../info/composables/GoalInfoScreen.kt | 11 ++---- .../info/composables/TransactionItem.kt | 20 ++-------- .../input/composables/IconPickerDialog.kt | 26 +++---------- .../screens/input/composables/InputScreen.kt | 23 ++--------- .../composables => other}/CongratsScreen.kt | 2 +- .../settings/composables/AboutScreen.kt | 3 +- .../settings/composables/GoalCardStyle.kt | 8 +--- .../screens/settings/composables/OSLScreen.kt | 3 +- .../settings/composables/SettingsScreen.kt | 12 +----- .../welcome/composables/WelcomeScreen.kt | 3 +- .../configuration/WidgetConfigActivity.kt | 15 +------- app/src/main/res/values-es/strings.xml | 6 +-- app/src/main/res/values-tr/strings.xml | 6 +-- app/src/main/res/values-zh-rCN/strings.xml | 6 +-- app/src/main/res/values/strings.xml | 6 +-- 35 files changed, 87 insertions(+), 292 deletions(-) rename app/src/main/java/com/starry/greenstash/ui/screens/{input => dwscreen}/composables/DWScreen.kt (99%) rename app/src/main/java/com/starry/greenstash/ui/screens/{input => dwscreen}/viewmodels/InputViewModel.kt (94%) rename app/src/main/java/com/starry/greenstash/ui/screens/{input/composables => other}/CongratsScreen.kt (99%) diff --git a/app/src/main/java/com/starry/greenstash/MainActivity.kt b/app/src/main/java/com/starry/greenstash/MainActivity.kt index db758d82..59d919f0 100644 --- a/app/src/main/java/com/starry/greenstash/MainActivity.kt +++ b/app/src/main/java/com/starry/greenstash/MainActivity.kt @@ -30,15 +30,10 @@ import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity import androidx.biometric.BiometricManager import androidx.biometric.BiometricPrompt -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.runtime.getValue -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.core.content.ContextCompat import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen @@ -51,15 +46,8 @@ import com.starry.greenstash.ui.screens.settings.viewmodels.ThemeMode import com.starry.greenstash.ui.theme.GreenStashTheme import com.starry.greenstash.utils.Utils import dagger.hilt.android.AndroidEntryPoint -import kotlinx.coroutines.ExperimentalCoroutinesApi import java.util.concurrent.Executor -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api @AndroidEntryPoint class MainActivity : AppCompatActivity() { diff --git a/app/src/main/java/com/starry/greenstash/MainViewModel.kt b/app/src/main/java/com/starry/greenstash/MainViewModel.kt index 38f9c92a..648e6d18 100644 --- a/app/src/main/java/com/starry/greenstash/MainViewModel.kt +++ b/app/src/main/java/com/starry/greenstash/MainViewModel.kt @@ -25,14 +25,9 @@ package com.starry.greenstash -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.MutableState import androidx.compose.runtime.State import androidx.compose.runtime.mutableStateOf -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.starry.greenstash.database.goal.GoalDao @@ -42,17 +37,11 @@ import com.starry.greenstash.ui.navigation.DrawerScreens import com.starry.greenstash.ui.navigation.Screens import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.launch import javax.inject.Inject -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + @HiltViewModel class MainViewModel @Inject constructor( private val welcomeDataStore: WelcomeDataStore, diff --git a/app/src/main/java/com/starry/greenstash/reminder/ReminderManager.kt b/app/src/main/java/com/starry/greenstash/reminder/ReminderManager.kt index b1d965eb..ab4414aa 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/ReminderManager.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/ReminderManager.kt @@ -30,24 +30,12 @@ import android.app.PendingIntent import android.content.Context import android.content.Intent import android.util.Log -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.ExperimentalComposeUiApi import com.starry.greenstash.database.core.GoalWithTransactions import com.starry.greenstash.reminder.receivers.AlarmReceiver -import kotlinx.coroutines.ExperimentalCoroutinesApi import java.util.Calendar import java.util.Locale -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi class ReminderManager(private val context: Context) { companion object { diff --git a/app/src/main/java/com/starry/greenstash/reminder/ReminderNotificationSender.kt b/app/src/main/java/com/starry/greenstash/reminder/ReminderNotificationSender.kt index 3b47152e..ccbfba80 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/ReminderNotificationSender.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/ReminderNotificationSender.kt @@ -29,11 +29,6 @@ import android.app.NotificationManager import android.app.PendingIntent import android.content.Context import android.content.Intent -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.core.app.NotificationCompat import com.starry.greenstash.MainActivity import com.starry.greenstash.R @@ -44,15 +39,8 @@ import com.starry.greenstash.reminder.receivers.ReminderDismissReceiver import com.starry.greenstash.utils.GoalTextUtils import com.starry.greenstash.utils.PreferenceUtil import com.starry.greenstash.utils.Utils -import kotlinx.coroutines.ExperimentalCoroutinesApi -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi class ReminderNotificationSender( private val context: Context, private val preferenceUtil: PreferenceUtil diff --git a/app/src/main/java/com/starry/greenstash/reminder/receivers/AlarmReceiver.kt b/app/src/main/java/com/starry/greenstash/reminder/receivers/AlarmReceiver.kt index 160ac7e0..89633a8b 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/receivers/AlarmReceiver.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/receivers/AlarmReceiver.kt @@ -29,11 +29,6 @@ import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.util.Log -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.ExperimentalComposeUiApi import com.starry.greenstash.database.core.GoalWithTransactions import com.starry.greenstash.database.goal.GoalDao import com.starry.greenstash.database.goal.GoalPriority @@ -42,19 +37,13 @@ import com.starry.greenstash.reminder.ReminderNotificationSender import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch import java.time.DayOfWeek import java.time.LocalDate import java.time.LocalDateTime import javax.inject.Inject -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + @AndroidEntryPoint class AlarmReceiver : BroadcastReceiver() { diff --git a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt index d5e54ce8..585a6937 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDepositReceiver.kt @@ -29,11 +29,6 @@ import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.util.Log -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.ExperimentalComposeUiApi import com.starry.greenstash.database.core.GoalWithTransactions import com.starry.greenstash.database.goal.GoalDao import com.starry.greenstash.database.transaction.Transaction @@ -45,16 +40,10 @@ import com.starry.greenstash.utils.Utils import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch import javax.inject.Inject -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + @AndroidEntryPoint class ReminderDepositReceiver : BroadcastReceiver() { diff --git a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDismissReceiver.kt b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDismissReceiver.kt index d84bb2d8..4b1fd12e 100644 --- a/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDismissReceiver.kt +++ b/app/src/main/java/com/starry/greenstash/reminder/receivers/ReminderDismissReceiver.kt @@ -29,22 +29,11 @@ import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.util.Log -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.ExperimentalComposeUiApi import com.starry.greenstash.reminder.ReminderNotificationSender import dagger.hilt.android.AndroidEntryPoint -import kotlinx.coroutines.ExperimentalCoroutinesApi import javax.inject.Inject -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + @AndroidEntryPoint class ReminderDismissReceiver : BroadcastReceiver() { diff --git a/app/src/main/java/com/starry/greenstash/ui/common/CurrencyPicker.kt b/app/src/main/java/com/starry/greenstash/ui/common/CurrencyPicker.kt index 969bad8b..efd384f8 100644 --- a/app/src/main/java/com/starry/greenstash/ui/common/CurrencyPicker.kt +++ b/app/src/main/java/com/starry/greenstash/ui/common/CurrencyPicker.kt @@ -65,7 +65,8 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun CurrencyPicker( defaultCurrencyValue: String, diff --git a/app/src/main/java/com/starry/greenstash/ui/common/ExpandableCard.kt b/app/src/main/java/com/starry/greenstash/ui/common/ExpandableCard.kt index 794fc617..06d784d6 100644 --- a/app/src/main/java/com/starry/greenstash/ui/common/ExpandableCard.kt +++ b/app/src/main/java/com/starry/greenstash/ui/common/ExpandableCard.kt @@ -26,7 +26,6 @@ package com.starry.greenstash.ui.common import android.os.Build -import android.widget.Toast import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.LinearOutSlowInEasing import androidx.compose.animation.core.animateFloatAsState @@ -66,14 +65,15 @@ import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.core.content.ContextCompat.getString import com.starry.greenstash.R +import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.toToast @ExperimentalMaterial3Api @@ -82,6 +82,7 @@ fun ExpandableCard( title: String, titleFontSize: TextUnit = 16.sp, titleFontWeight: FontWeight = FontWeight.Bold, + titleFontFamily: FontFamily = greenstashFont, shape: Shape = RoundedCornerShape(8.dp), padding: Dp = 12.dp, expanded: Boolean = false, @@ -157,13 +158,15 @@ fun ExpandableTextCard( title: String, titleFontSize: TextUnit = 16.sp, titleFontWeight: FontWeight = FontWeight.Bold, + titleFontFamily: FontFamily = greenstashFont, description: String, descriptionFontSize: TextUnit = 14.sp, descriptionFontWeight: FontWeight = FontWeight.Normal, + descriptionFontFamily: FontFamily = greenstashFont, descriptionMaxLines: Int = 10, shape: Shape = RoundedCornerShape(8.dp), - showCopyButton: Boolean = false, padding: Dp = 12.dp, + showCopyButton: Boolean = false, ) { val context = LocalContext.current val clipboardManager = LocalClipboardManager.current @@ -172,6 +175,7 @@ fun ExpandableTextCard( title = title, titleFontSize = titleFontSize, titleFontWeight = titleFontWeight, + titleFontFamily = titleFontFamily, shape = shape, padding = padding ) { @@ -179,6 +183,7 @@ fun ExpandableTextCard( text = description, fontSize = descriptionFontSize, fontWeight = descriptionFontWeight, + fontFamily = descriptionFontFamily, maxLines = descriptionMaxLines, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(start = 12.dp, end = 12.dp) @@ -188,7 +193,7 @@ fun ExpandableTextCard( onClick = { clipboardManager.setText(AnnotatedString(description)) if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) { - getString(context, R.string.info_copy_alert).toToast(context) + context.getString(R.string.info_copy_notes_alert).toToast(context) } }, modifier = Modifier.padding(start = 8.dp, top = 8.dp) @@ -196,11 +201,15 @@ fun ExpandableTextCard( Row { Icon( Icons.Filled.ContentCopy, - contentDescription = stringResource(R.string.info_copy_icon_description), + contentDescription = stringResource(R.string.info_copy_notes_icon_desc), modifier = Modifier.size(ButtonDefaults.IconSize) ) Spacer(Modifier.width(ButtonDefaults.IconSpacing)) - Text(text = stringResource(id = R.string.info_copy_button)) + Text( + text = stringResource(id = R.string.info_copy_notes_button), + fontFamily = greenstashFont, + fontSize = 14.sp + ) } } } diff --git a/app/src/main/java/com/starry/greenstash/ui/navigation/NavGraph.kt b/app/src/main/java/com/starry/greenstash/ui/navigation/NavGraph.kt index 7f97d098..673a4028 100644 --- a/app/src/main/java/com/starry/greenstash/ui/navigation/NavGraph.kt +++ b/app/src/main/java/com/starry/greenstash/ui/navigation/NavGraph.kt @@ -25,20 +25,15 @@ package com.starry.greenstash.ui.navigation -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.animation.core.tween import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.animation.slideInHorizontally import androidx.compose.animation.slideOutHorizontally -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.navigation.NavHostController import androidx.navigation.NavType @@ -46,17 +41,16 @@ import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import androidx.navigation.navArgument import com.starry.greenstash.ui.screens.backups.BackupScreen +import com.starry.greenstash.ui.screens.dwscreen.composables.DWScreen import com.starry.greenstash.ui.screens.home.composables.HomeScreen import com.starry.greenstash.ui.screens.info.composables.GoalInfoScreen -import com.starry.greenstash.ui.screens.input.composables.CongratsScreen -import com.starry.greenstash.ui.screens.input.composables.DWScreen import com.starry.greenstash.ui.screens.input.composables.InputScreen +import com.starry.greenstash.ui.screens.other.CongratsScreen import com.starry.greenstash.ui.screens.settings.composables.AboutScreen import com.starry.greenstash.ui.screens.settings.composables.GoalCardStyle import com.starry.greenstash.ui.screens.settings.composables.OSLScreen import com.starry.greenstash.ui.screens.settings.composables.SettingsScreen import com.starry.greenstash.ui.screens.welcome.composables.WelcomeScreen -import kotlinx.coroutines.ExperimentalCoroutinesApi private const val NAVIGATION_ANIM_DURATION = 300 @@ -85,12 +79,7 @@ private fun popExitTransition() = slideOutHorizontally( ) ) + fadeOut(animationSpec = tween(NAVIGATION_ANIM_DURATION)) -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi + @Composable fun NavGraph( navController: NavHostController, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/backups/BackupScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/backups/BackupScreen.kt index 8377d9f8..64987a11 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/backups/BackupScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/backups/BackupScreen.kt @@ -78,7 +78,7 @@ import java.io.Reader import java.nio.charset.StandardCharsets -@ExperimentalMaterial3Api +@OptIn(ExperimentalMaterial3Api::class) @Composable fun BackupScreen(navController: NavController) { val context = LocalContext.current diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/DWScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/composables/DWScreen.kt similarity index 99% rename from app/src/main/java/com/starry/greenstash/ui/screens/input/composables/DWScreen.kt rename to app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/composables/DWScreen.kt index 55219fbf..c8ddad89 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/DWScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/composables/DWScreen.kt @@ -23,7 +23,7 @@ */ -package com.starry.greenstash.ui.screens.input.composables +package com.starry.greenstash.ui.screens.dwscreen.composables import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -100,7 +100,8 @@ import kotlinx.coroutines.withContext import java.time.LocalDateTime import java.time.format.DateTimeFormatter -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun DWScreen(goalId: String, transactionTypeName: String, navController: NavController) { val context = LocalContext.current diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/input/viewmodels/InputViewModel.kt b/app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/viewmodels/InputViewModel.kt similarity index 94% rename from app/src/main/java/com/starry/greenstash/ui/screens/input/viewmodels/InputViewModel.kt rename to app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/viewmodels/InputViewModel.kt index a4c5bb94..d6be6632 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/input/viewmodels/InputViewModel.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/dwscreen/viewmodels/InputViewModel.kt @@ -23,21 +23,16 @@ */ -package com.starry.greenstash.ui.screens.input.viewmodels +package com.starry.greenstash.ui.screens.dwscreen.viewmodels import android.content.Context import android.graphics.Bitmap import android.net.Uri -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.MutableState import androidx.compose.runtime.State import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.graphics.vector.ImageVector import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope @@ -52,7 +47,6 @@ import com.starry.greenstash.utils.PreferenceUtil import com.starry.greenstash.utils.Utils import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -85,12 +79,7 @@ data class InputScreenState( val reminder: Boolean = false ) -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + @HiltViewModel class InputViewModel @Inject constructor( private val goalDao: GoalDao, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalItems.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalItems.kt index 68e2299f..acec502b 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalItems.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalItems.kt @@ -225,7 +225,7 @@ fun GoalItemClassic( } -@ExperimentalMaterial3Api +@OptIn(ExperimentalMaterial3Api::class) @Composable fun GoalItemCompact( title: String, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalLazyItem.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalLazyItem.kt index 6f668f40..0a5a0809 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalLazyItem.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/GoalLazyItem.kt @@ -26,12 +26,8 @@ package com.starry.greenstash.ui.screens.home.composables import android.content.Context -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.SnackbarHostState import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -39,7 +35,6 @@ import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.navigation.NavController @@ -54,15 +49,9 @@ import com.starry.greenstash.utils.Constants import com.starry.greenstash.utils.ImageUtils import com.starry.greenstash.utils.Utils import com.starry.greenstash.utils.getActivity -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalMaterial3Api + @Composable fun GoalLazyColumnItem( context: Context, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeAppBars.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeAppBars.kt index 7565a5d0..2d90dbe0 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeAppBars.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeAppBars.kt @@ -58,7 +58,7 @@ import com.starry.greenstash.R import com.starry.greenstash.ui.screens.home.viewmodels.SearchWidgetState import com.starry.greenstash.ui.theme.greenstashFont -@ExperimentalMaterial3Api + @Composable fun MainAppBar( onMenuClicked: () -> Unit, @@ -95,7 +95,8 @@ fun MainAppBar( } } -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun DefaultAppBar( onMenuClicked: () -> Unit, @@ -137,7 +138,7 @@ fun DefaultAppBar( ) } -@ExperimentalMaterial3Api + @Composable fun SearchAppBar( text: String, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeDialogs.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeDialogs.kt index 8abed444..beab8d83 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeDialogs.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeDialogs.kt @@ -29,7 +29,6 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Delete import androidx.compose.material3.AlertDialog import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FilledTonalButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -43,7 +42,7 @@ import androidx.compose.ui.res.stringResource import com.starry.greenstash.R import com.starry.greenstash.ui.theme.greenstashFont -@ExperimentalMaterial3Api + @Composable fun HomeDialogs( openDeleteDialog: MutableState, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeScreen.kt index 7b7659de..065ec9ba 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/composables/HomeScreen.kt @@ -27,7 +27,6 @@ package com.starry.greenstash.ui.screens.home.composables import android.content.Context import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.core.keyframes import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut @@ -58,7 +57,6 @@ import androidx.compose.material.rememberModalBottomSheetState import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.DrawerValue -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExtendedFloatingActionButton import androidx.compose.material3.FloatingActionButtonDefaults import androidx.compose.material3.HorizontalDivider @@ -83,7 +81,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector @@ -121,17 +118,14 @@ import com.starry.greenstash.ui.screens.home.viewmodels.SearchWidgetState import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.Utils import com.starry.greenstash.utils.isScrollingUp -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.launch import java.util.Locale -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalMaterial3Api + +@OptIn( + ExperimentalMaterialApi::class +) @Composable fun HomeScreen(navController: NavController) { val context = LocalContext.current @@ -159,12 +153,8 @@ fun HomeScreen(navController: NavController) { } -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterialApi::class, ExperimentalFoundationApi::class) @Composable fun HomeScreenContent( context: Context, @@ -495,12 +485,7 @@ fun HomeScreenContent( } } -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api + @Composable fun FilterMenuSheet(viewModel: HomeViewModel) { Column( @@ -536,7 +521,7 @@ fun FilterMenuSheet(viewModel: HomeViewModel) { } } -@ExperimentalMaterial3Api + @Composable fun FilterButton(text: String, isSelected: Boolean, onClick: () -> Unit) { val buttonColor: Color @@ -578,12 +563,7 @@ fun FilterButton(text: String, isSelected: Boolean, onClick: () -> Unit) { } } -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalMaterial3Api + @Composable @Preview fun HomeScreenPreview() { diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/home/viewmodels/HomeViewModel.kt b/app/src/main/java/com/starry/greenstash/ui/screens/home/viewmodels/HomeViewModel.kt index 6534372c..4fa1ac5b 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/home/viewmodels/HomeViewModel.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/home/viewmodels/HomeViewModel.kt @@ -25,14 +25,9 @@ package com.starry.greenstash.ui.screens.home.viewmodels -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.material.ExperimentalMaterialApi -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.MutableState import androidx.compose.runtime.State import androidx.compose.runtime.mutableStateOf -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.lifecycle.ViewModel import androidx.lifecycle.asLiveData import androidx.lifecycle.viewModelScope @@ -43,7 +38,6 @@ import com.starry.greenstash.utils.GoalTextUtils import com.starry.greenstash.utils.PreferenceUtil import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.launch @@ -55,12 +49,7 @@ enum class FilterSortType(val value: Int) { Ascending(1), Descending(2) } enum class GoalCardStyle { Classic, Compact } data class FilterFlowData(val filterField: FilterField, val sortType: FilterSortType) -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api -@ExperimentalCoroutinesApi + @HiltViewModel class HomeViewModel @Inject constructor( private val goalDao: GoalDao, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/EditTransactionSheet.kt b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/EditTransactionSheet.kt index c91ced54..e347dd42 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/EditTransactionSheet.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/EditTransactionSheet.kt @@ -66,8 +66,8 @@ import com.maxkeppeler.sheets.date_time.models.DateTimeSelection import com.starry.greenstash.R import com.starry.greenstash.database.transaction.Transaction import com.starry.greenstash.database.transaction.TransactionType +import com.starry.greenstash.ui.screens.dwscreen.composables.DateTimePicker import com.starry.greenstash.ui.screens.info.viewmodels.InfoViewModel -import com.starry.greenstash.ui.screens.input.composables.DateTimePicker import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.Utils import com.starry.greenstash.utils.toToast diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/GoalInfoScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/GoalInfoScreen.kt index 3498ba7f..94362e5d 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/GoalInfoScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/GoalInfoScreen.kt @@ -103,12 +103,7 @@ import com.starry.greenstash.utils.Utils import kotlinx.coroutines.ExperimentalCoroutinesApi -@ExperimentalCoroutinesApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterialApi -@ExperimentalMaterial3Api +@OptIn(ExperimentalMaterial3Api::class) @Composable fun GoalInfoScreen(goalId: String, navController: NavController) { @@ -399,7 +394,9 @@ fun GoalPriorityCard(goalPriority: GoalPriority, reminders: Boolean) { @Composable fun GoalNotesCard(notesText: String) { ExpandableTextCard( - title = stringResource(id = R.string.info_notes_card_title), description = notesText, showCopyButton = true + title = stringResource(id = R.string.info_notes_card_title), + description = notesText, + showCopyButton = true ) } diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/TransactionItem.kt b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/TransactionItem.kt index 10ca18e9..efa41a62 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/TransactionItem.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/info/composables/TransactionItem.kt @@ -25,10 +25,8 @@ package com.starry.greenstash.ui.screens.info.composables -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.animateColorAsState import androidx.compose.animation.core.animateFloatAsState -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -39,7 +37,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Delete import androidx.compose.material3.AlertDialog @@ -63,7 +60,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.scale @@ -85,17 +81,12 @@ import com.starry.greenstash.ui.screens.settings.viewmodels.ThemeMode import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.getActivity import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun TransactionItem( transactions: List, @@ -236,12 +227,7 @@ fun TransactionItem( } -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi + @Composable fun TransactionCard(transaction: Transaction, currencySymbol: String) { Card( diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/IconPickerDialog.kt b/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/IconPickerDialog.kt index c02280eb..54d253e0 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/IconPickerDialog.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/IconPickerDialog.kt @@ -25,8 +25,6 @@ package com.starry.greenstash.ui.screens.input.composables -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -44,14 +42,12 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Image import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField @@ -63,7 +59,6 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalContext @@ -75,18 +70,12 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.window.Dialog import com.starry.greenstash.R -import com.starry.greenstash.ui.screens.input.viewmodels.IconItem -import com.starry.greenstash.ui.screens.input.viewmodels.IconsState -import com.starry.greenstash.ui.screens.input.viewmodels.InputViewModel +import com.starry.greenstash.ui.screens.dwscreen.viewmodels.IconItem +import com.starry.greenstash.ui.screens.dwscreen.viewmodels.IconsState +import com.starry.greenstash.ui.screens.dwscreen.viewmodels.InputViewModel import com.starry.greenstash.ui.theme.greenstashFont -import kotlinx.coroutines.ExperimentalCoroutinesApi -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi + @Composable fun IconPickerDialog( viewModel: InputViewModel, @@ -174,12 +163,7 @@ fun IconPickerDialog( } -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi + @Composable private fun SearchTextField( viewModel: InputViewModel, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/InputScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/InputScreen.kt index 94187774..7e0ac7bb 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/InputScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/InputScreen.kt @@ -134,7 +134,7 @@ import com.starry.greenstash.R import com.starry.greenstash.database.goal.GoalPriority import com.starry.greenstash.ui.common.SelectableChipGroup import com.starry.greenstash.ui.navigation.DrawerScreens -import com.starry.greenstash.ui.screens.input.viewmodels.InputViewModel +import com.starry.greenstash.ui.screens.dwscreen.viewmodels.InputViewModel import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.ImageUtils import com.starry.greenstash.utils.Utils @@ -150,12 +150,7 @@ import java.time.LocalDate import java.time.format.DateTimeFormatter -@ExperimentalCoroutinesApi -@ExperimentalAnimationApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalMaterial3Api +@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class) @Composable fun InputScreen(editGoalId: String?, navController: NavController) { val context = LocalContext.current @@ -708,12 +703,7 @@ fun GoalIconPicker( } } -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi + @Composable fun GoalPriorityMenu(viewModel: InputViewModel) { Card( @@ -756,12 +746,7 @@ fun GoalPriorityMenu(viewModel: InputViewModel) { } } -@ExperimentalCoroutinesApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi + @Composable fun GoalReminderMenu( context: Context, diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/CongratsScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/other/CongratsScreen.kt similarity index 99% rename from app/src/main/java/com/starry/greenstash/ui/screens/input/composables/CongratsScreen.kt rename to app/src/main/java/com/starry/greenstash/ui/screens/other/CongratsScreen.kt index 717e6a8a..3988dfdd 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/input/composables/CongratsScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/other/CongratsScreen.kt @@ -23,7 +23,7 @@ */ -package com.starry.greenstash.ui.screens.input.composables +package com.starry.greenstash.ui.screens.other import android.media.MediaPlayer import androidx.activity.compose.BackHandler diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/AboutScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/AboutScreen.kt index 59bc0863..564ef6b9 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/AboutScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/AboutScreen.kt @@ -71,7 +71,8 @@ sealed class AboutLinks(val url: String) { data object Sponser : AboutLinks("https://github.com/sponsors/starry-shivam") } -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun AboutScreen(navController: NavController) { val context = LocalContext.current diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/GoalCardStyle.kt b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/GoalCardStyle.kt index 5896cfd4..e2617c77 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/GoalCardStyle.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/GoalCardStyle.kt @@ -85,12 +85,8 @@ import com.starry.greenstash.utils.getActivity import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay -@ExperimentalCoroutinesApi -@ExperimentalAnimationApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun GoalCardStyle(navController: NavController) { val context = navController.context diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/OSLScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/OSLScreen.kt index 84cfd0cc..c60f14fe 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/OSLScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/OSLScreen.kt @@ -47,7 +47,8 @@ import com.mikepenz.aboutlibraries.ui.compose.LibraryDefaults import com.starry.greenstash.R import com.starry.greenstash.ui.theme.greenstashFont -@ExperimentalMaterial3Api + +@OptIn(ExperimentalMaterial3Api::class) @Composable fun OSLScreen(navController: NavController) { Scaffold(modifier = Modifier.fillMaxSize(), topBar = { diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/SettingsScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/SettingsScreen.kt index 198d360e..f9805c4c 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/SettingsScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/settings/composables/SettingsScreen.kt @@ -27,8 +27,6 @@ package com.starry.greenstash.ui.screens.settings.composables import android.os.Build import androidx.biometric.BiometricPrompt -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -39,7 +37,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.selection.selectable import androidx.compose.foundation.selection.selectableGroup -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Style @@ -64,7 +61,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector @@ -90,16 +86,10 @@ import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.utils.Utils import com.starry.greenstash.utils.getActivity import com.starry.greenstash.utils.toToast -import kotlinx.coroutines.ExperimentalCoroutinesApi import java.util.concurrent.Executor -@ExperimentalCoroutinesApi -@ExperimentalMaterialApi -@ExperimentalFoundationApi -@ExperimentalComposeUiApi -@ExperimentalAnimationApi -@ExperimentalMaterial3Api +@OptIn(ExperimentalMaterial3Api::class) @Composable fun SettingsScreen(navController: NavController) { val context = LocalContext.current diff --git a/app/src/main/java/com/starry/greenstash/ui/screens/welcome/composables/WelcomeScreen.kt b/app/src/main/java/com/starry/greenstash/ui/screens/welcome/composables/WelcomeScreen.kt index 6242ea71..88ab56e9 100644 --- a/app/src/main/java/com/starry/greenstash/ui/screens/welcome/composables/WelcomeScreen.kt +++ b/app/src/main/java/com/starry/greenstash/ui/screens/welcome/composables/WelcomeScreen.kt @@ -41,7 +41,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FilledTonalButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton @@ -72,7 +71,7 @@ import com.starry.greenstash.ui.navigation.DrawerScreens import com.starry.greenstash.ui.screens.welcome.viewmodels.WelcomeViewModel import com.starry.greenstash.ui.theme.greenstashFont -@ExperimentalMaterial3Api + @Composable fun WelcomeScreen(navController: NavController) { val context = LocalContext.current diff --git a/app/src/main/java/com/starry/greenstash/widget/configuration/WidgetConfigActivity.kt b/app/src/main/java/com/starry/greenstash/widget/configuration/WidgetConfigActivity.kt index c604c0f9..74be435a 100644 --- a/app/src/main/java/com/starry/greenstash/widget/configuration/WidgetConfigActivity.kt +++ b/app/src/main/java/com/starry/greenstash/widget/configuration/WidgetConfigActivity.kt @@ -31,8 +31,6 @@ import android.os.Bundle import androidx.activity.compose.setContent import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity -import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -47,7 +45,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material3.Card @@ -71,7 +68,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector @@ -95,17 +91,9 @@ import com.starry.greenstash.ui.screens.settings.viewmodels.ThemeMode import com.starry.greenstash.ui.theme.GreenStashTheme import com.starry.greenstash.ui.theme.greenstashFont import com.starry.greenstash.widget.GoalWidget -import dagger.hilt.android.AndroidEntryPoint -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay -@ExperimentalCoroutinesApi -@ExperimentalComposeUiApi -@ExperimentalFoundationApi -@ExperimentalMaterialApi -@AndroidEntryPoint -@ExperimentalMaterial3Api -@ExperimentalAnimationApi + class WidgetConfigActivity : AppCompatActivity() { private val viewModel: WidgetConfigViewModel by viewModels() @@ -150,6 +138,7 @@ class WidgetConfigActivity : AppCompatActivity() { } } + @OptIn(ExperimentalMaterial3Api::class) @Composable private fun ConfigScreenContent(viewModel: WidgetConfigViewModel, appWidgetId: Int) { Scaffold( diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d06c0915..b60fa6bf 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -89,12 +89,12 @@ Los recordatorios están activados Los recordatorios están desactivados Notas + Copiar + Copiar notas + ¡Copiado correctamente! Sin transacciones aún. Actualizar Transacción Consejo: Desliza las transacciones hacia la izquierda o hacia la derecha para editarlas o eliminarlas. - Copy - Copy Notes - Copied ¡Es momento de ahorrar! diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 81e46536..0961b3fc 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -89,12 +89,12 @@ Hatırlatıcılar etkin Hatırlatıcılar devre dışı Notlar + Kopyala + Notları Kopyala + Başarıyla Kopyalandı! Henüz İşlem Yok. İşlemi Güncelle İpucu: İşlemleri düzenlemek veya silmek için sola veya sağa kaydırın. - Copy - Copy Notes - Copied Birikim yapma zamanı! diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 6e395365..3f59c4ac 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -89,12 +89,12 @@ 提醒已启用 提醒已禁用 备注 + 复制 + 复制笔记 + 复制成功! 尚无收支。 更新交易 提示:左右滑动交易以编辑或删除它们。 - Copy - Copy Notes - Copied 省钱时间到! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d493b06e..a429d93a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -89,12 +89,12 @@ Reminders are enabled Reminders are disabled Notes + Copy + Copy Notes + Copied Successfully! No Transactions Yet. Update Transaction Tip: Swipe transactions left or right to edit or delete them. - Copy - Copy Notes - Copied Successfully! It\'s time to save!