mirror of
https://github.com/oxyroid/M3UAndroid.git
synced 2025-08-06 14:59:48 +08:00
1.1 KiB
1.1 KiB
Rules
- Never use Java, use Kotlin always.
- Do not import-on-demand (star-import).
- Most of composable functions without return types should be restartable and skippable.
- You can use List/Map/Set for composable functions because we add these types to compose_compiler_config.
- If you want to change the visibility of the system bars, you can do so by calling
Helper#statusBarsVisibility
orHelper#navigationBarsVisibility
. - If you want to create a new string resource, you can do so by creating it in the i18n module and
then accessing it using
import <package>.i18n.R.string
. - If you wish to apply additional dependencies, consider using version catalogs.
- Never use AndroidViewModel, use context in UI layer only.
- Never use view-based XML, you can use view in AndroidView composable only.
- Never use Painter to inflate drawable resources, use
ImageVector.vectorResource
instead. - If you wanna to add some libraries, please make sure they are located in MavenCentral, google or jitpack repository. And jar library is not allowed as well.