-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* # Pre-release-v6.0.0.3 done * # Scroll view issue solve in ViewSubjectScreen * # Time Bound added !! * # Connectivity check added * # Some change in YML file
- Loading branch information
1 parent
99a734e
commit 572c932
Showing
20 changed files
with
457 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,4 +162,6 @@ dependencies { | |
|
||
implementation(libs.graph) | ||
|
||
implementation("com.github.instacart:truetime-android:3.5") | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
bitapp/src/main/java/com/atech/bit/ui/comman/emptyScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.atech.bit.ui.comman | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxHeight | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.airbnb.lottie.compose.LottieAnimation | ||
import com.airbnb.lottie.compose.LottieCompositionSpec | ||
import com.airbnb.lottie.compose.LottieConstants | ||
import com.airbnb.lottie.compose.animateLottieCompositionAsState | ||
import com.airbnb.lottie.compose.rememberLottieComposition | ||
import com.atech.bit.R | ||
import com.atech.bit.ui.theme.BITAppTheme | ||
import com.atech.bit.ui.theme.grid_1 | ||
|
||
@Composable | ||
fun GlobalEmptyScreen( | ||
modifier: Modifier = Modifier, | ||
isEmpty: Boolean = true, | ||
emptyText: String = "Empty", | ||
content: @Composable () -> Unit = {} | ||
) { | ||
if (isEmpty) | ||
Column( | ||
modifier = modifier | ||
.padding(grid_1) | ||
.fillMaxWidth() | ||
.background( | ||
color = MaterialTheme.colorScheme.surface | ||
), | ||
verticalArrangement = Arrangement.Center, | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.empty_screen)) | ||
val progress by animateLottieCompositionAsState( | ||
composition, | ||
iterations = LottieConstants.IterateForever | ||
) | ||
LottieAnimation( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.fillMaxHeight(0.5f), | ||
composition = composition, | ||
progress = { progress }, | ||
) | ||
Text(text = emptyText) | ||
} | ||
else | ||
content() | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
private fun GlobalEmptyScreenPreview() { | ||
BITAppTheme { | ||
GlobalEmptyScreen() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.