This file contains hidden or 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
| @Composable | |
| fun Mirror(content: @Composable () -> Unit) { | |
| Column { | |
| content() | |
| Box(modifier = Modifier | |
| .graphicsLayer { | |
| alpha = 0.99f | |
| rotationZ = 180f | |
| } | |
| .drawWithContent { |
This file contains hidden or 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
| val reviewManager = remember { | |
| ReviewManagerFactory.create(localContext) | |
| } | |
| val reviewInfo = rememberReviewTask(reviewManager) | |
| LaunchedEffect(key1 = reviewInfo) { | |
| reviewInfo?.let { | |
| reviewManager.launchReviewFlow(localContext as Activity, reviewInfo) | |
| } |
This file contains hidden or 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
| LaunchedEffect(key1 = reviewInfo) { | |
| reviewInfo?.let { | |
| reviewManager.launchReviewFlow(localContext as Activity, reviewInfo) | |
| } | |
| } |
This file contains hidden or 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
| @Composable | |
| fun rememberReviewTask(reviewManager: ReviewManager): ReviewInfo? { | |
| var reviewInfo: ReviewInfo? by remember { | |
| mutableStateOf(null) | |
| } | |
| reviewManager.requestReviewFlow().addOnCompleteListener { | |
| if (it.isSuccessful) { | |
| reviewInfo = it.result | |
| } | |
| } |
This file contains hidden or 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
| val localContext = LocalContext.current | |
| val reviewManager = remember { | |
| ReviewManagerFactory.create(localContext) | |
| } |
This file contains hidden or 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
| reviewManager.requestReviewFlow().addOnCompleteListener { | |
| if (it.isSuccessful) { | |
| reviewInfo = it.result | |
| } | |
| } |
This file contains hidden or 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
| implementation "androidx.compose.ui:ui-text-google-fonts:1.2.0-alpha07" |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <array name="com_google_android_gms_fonts_certs"> | |
| <item>@array/com_google_android_gms_fonts_certs_dev</item> | |
| <item>@array/com_google_android_gms_fonts_certs_prod</item> | |
| </array> | |
| <string-array name="com_google_android_gms_fonts_certs_dev"> | |
| <item> | |
| MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwq |
This file contains hidden or 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
| @OptIn(ExperimentalTextApi::class) | |
| private fun getGoogleFontFamily( | |
| name: String, | |
| provider: GoogleFont.Provider = googleFontProvider, | |
| weights: List<FontWeight> | |
| ): FontFamily { | |
| return FontFamily( | |
| weights.map { | |
| Font(GoogleFont(name), provider, it) |
This file contains hidden or 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
| @OptIn(ExperimentalTextApi::class) | |
| private val googleFontProvider: GoogleFont.Provider by lazy { | |
| GoogleFont.Provider( | |
| providerAuthority = "com.google.android.gms.fonts", | |
| providerPackage = "com.google.android.gms", | |
| certificates = R.array.com_google_android_gms_fonts_certs | |
| ) | |
| } |
NewerOlder