From 56e1a295b40376d263a2001344d57956ef67d238 Mon Sep 17 00:00:00 2001 From: rustamsafarovrs Date: Tue, 25 Jun 2024 09:25:42 +0500 Subject: [PATCH] [fix] rounded corners progress indicator --- app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt | 2 +- .../main/java/tj/rsdevteam/inmuslim/ui/common/Components.kt | 5 +++-- .../main/java/tj/rsdevteam/inmuslim/ui/home/HomeScreens.kt | 4 ++-- .../java/tj/rsdevteam/inmuslim/ui/region/RegionScreens.kt | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt b/app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt index 075d5e9..e7344b6 100644 --- a/app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt +++ b/app/src/main/java/tj/rsdevteam/inmuslim/config/BuildVars.kt @@ -7,7 +7,7 @@ package tj.rsdevteam.inmuslim.config object BuildVars { - val BUILD_TYPE = BuildType.TEST + val BUILD_TYPE = BuildType.PROD val BASE_URL: String = when (BUILD_TYPE) { BuildType.TEST -> { diff --git a/app/src/main/java/tj/rsdevteam/inmuslim/ui/common/Components.kt b/app/src/main/java/tj/rsdevteam/inmuslim/ui/common/Components.kt index 679b955..ed5c3c2 100644 --- a/app/src/main/java/tj/rsdevteam/inmuslim/ui/common/Components.kt +++ b/app/src/main/java/tj/rsdevteam/inmuslim/ui/common/Components.kt @@ -11,6 +11,7 @@ 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.StrokeCap import androidx.compose.ui.unit.dp import tj.rsdevteam.inmuslim.ui.theme.InmuslimTypography @@ -34,11 +35,11 @@ fun PrimaryButton(text: String, onClick: () -> Unit) { } @Composable -fun ProgressBar() { +fun ProgressIndicator() { Box( modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center ) { - CircularProgressIndicator() + CircularProgressIndicator(strokeCap = StrokeCap.Round) } } diff --git a/app/src/main/java/tj/rsdevteam/inmuslim/ui/home/HomeScreens.kt b/app/src/main/java/tj/rsdevteam/inmuslim/ui/home/HomeScreens.kt index a148072..40eaa9d 100644 --- a/app/src/main/java/tj/rsdevteam/inmuslim/ui/home/HomeScreens.kt +++ b/app/src/main/java/tj/rsdevteam/inmuslim/ui/home/HomeScreens.kt @@ -28,7 +28,7 @@ import androidx.hilt.navigation.compose.hiltViewModel import tj.rsdevteam.inmuslim.R import tj.rsdevteam.inmuslim.data.models.Timing import tj.rsdevteam.inmuslim.ui.common.ErrorDialog -import tj.rsdevteam.inmuslim.ui.common.ProgressBar +import tj.rsdevteam.inmuslim.ui.common.ProgressIndicator import tj.rsdevteam.inmuslim.ui.theme.InmuslimShapes import tj.rsdevteam.inmuslim.ui.theme.InmuslimTheme import tj.rsdevteam.inmuslim.ui.theme.InmuslimTypography @@ -73,7 +73,7 @@ fun HomeScreen( ) { paddingValues -> ErrorDialog(viewModel.dialogState.value) if (viewModel.showLoading.value) { - ProgressBar() + ProgressIndicator() } Column( modifier = Modifier diff --git a/app/src/main/java/tj/rsdevteam/inmuslim/ui/region/RegionScreens.kt b/app/src/main/java/tj/rsdevteam/inmuslim/ui/region/RegionScreens.kt index 5a706a4..98f5e65 100644 --- a/app/src/main/java/tj/rsdevteam/inmuslim/ui/region/RegionScreens.kt +++ b/app/src/main/java/tj/rsdevteam/inmuslim/ui/region/RegionScreens.kt @@ -24,7 +24,7 @@ import tj.rsdevteam.inmuslim.R import tj.rsdevteam.inmuslim.data.models.Region import tj.rsdevteam.inmuslim.ui.common.ErrorDialog import tj.rsdevteam.inmuslim.ui.common.PrimaryButton -import tj.rsdevteam.inmuslim.ui.common.ProgressBar +import tj.rsdevteam.inmuslim.ui.common.ProgressIndicator import tj.rsdevteam.inmuslim.ui.theme.InmuslimTypography /** @@ -59,7 +59,7 @@ fun RegionScreen(viewModel: RegionViewModel = hiltViewModel(), onSelected: () -> ErrorDialog(dialogState = viewModel.dialogState.value) Column { if (viewModel.showLoading.value) { - ProgressBar() + ProgressIndicator() } else { Spacer(modifier = Modifier.height(30.dp)) Text(