<style name="TopSheet_DialogAnimation">
<item name="android:windowEnterAnimation">@anim/slide_out_from_top</item>
<item name="android:windowExitAnimation">@anim/slide_back_to_top</item>
</style>
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
| import 'package:flutter/material.dart'; | |
| import 'package:go_router/go_router.dart'; | |
| /// A mixin that allows a widget to be aware of the current route. | |
| /// | |
| /// ```dart | |
| /// class MyWidget extends StatefulWidget { | |
| /// const MyWidget({super.key}); | |
| /// @override | |
| /// State<MyWidget> createState() => _MyWidgetState(); |
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
| // app/build.gradle | |
| plugins { | |
| id 'com.android.application' | |
| // Use modern Kotlin Android plugin ID aligned with settings.gradle | |
| id 'org.jetbrains.kotlin.android' | |
| id 'dev.flutter.flutter-gradle-plugin' | |
| } | |
| ... |
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
| ADB = YOUR_ADB_PATH | |
| PACKAGE_NAME = YOUR_PACKAGE_NAME | |
| MAIN_ACTIVITY = .entry.MainActivity | |
| clean: | |
| ./gradlew clean | |
| build: | |
| ./gradlew build |
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 SegmentedArcProgressIndicator( | |
| progress: Float, | |
| strokeWidth: Float = 48f, | |
| maxAngle: Float = 160f, | |
| gapAngle: Float = 15f, | |
| backgroundColor: Color = Color(0xffCBE0E8), | |
| progressColor: Brush = Brush.linearGradient(listOf(Color(0xff83B2D1), Color(0xff106AA7))) | |
| ) { | |
| val animatedProgress by animateFloatAsState( |
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
| /** | |
| * Reduces drag sensitivity of [ViewPager2] widget | |
| */ | |
| fun ViewPager2.reduceDragSensitivity() { | |
| val recyclerViewField = ViewPager2::class.java.getDeclaredField("mRecyclerView") | |
| recyclerViewField.isAccessible = true | |
| val recyclerView = recyclerViewField.get(this) as RecyclerView | |
| val touchSlopField = RecyclerView::class.java.getDeclaredField("mTouchSlop") | |
| touchSlopField.isAccessible = true |
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
| import android.util.Base64 | |
| import java.security.KeyFactory | |
| import java.security.PrivateKey | |
| import java.security.PublicKey | |
| import java.security.spec.PKCS8EncodedKeySpec | |
| import java.security.spec.X509EncodedKeySpec | |
| import javax.crypto.Cipher | |
| /** | |
| * |
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
| // ref: https://www.baeldung.com/java-aes-encryption-decryption | |
| import java.util.* | |
| import javax.crypto.Cipher | |
| import javax.crypto.spec.IvParameterSpec | |
| import javax.crypto.spec.SecretKeySpec | |
| fun decrypt(algorithm: String, cipherText: String, key: SecretKeySpec, iv: IvParameterSpec): String { | |
| val cipher = Cipher.getInstance(algorithm) |
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
| package productmeister.com.productmeister.view; | |
| import android.annotation.TargetApi; | |
| import android.os.Build; | |
| import android.support.design.widget.AppBarLayout; | |
| import android.support.v4.view.ViewCompat; | |
| import android.support.v7.app.ActionBar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; |
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
| package com.jitosoft.imageloadapp.util; | |
| import android.content.ContentUris; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.graphics.Bitmap; | |
| import android.net.Uri; | |
| import android.os.Build; | |
| import android.os.Environment; | |
| import android.provider.DocumentsContract; |
NewerOlder