Skip to content

Instantly share code, notes, and snippets.

View CMyae's full-sized avatar

Chan Myae Aung CMyae

View GitHub Profile
@Khazbs
Khazbs / Theme.kt
Last active March 8, 2025 16:14
This snippet might help you make a Material Design 3 theme for your Jetpack Compose app
package my.awesome.package // put your package name here
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
@andijakl
andijakl / build.gradle
Created January 24, 2019 18:53
Dependencies for using Retrofit, Moshi and Kotlin Coroutines
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation "com.squareup.retrofit2:converter-moshi:2.5.0"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
// Moshi
implementation "com.squareup.moshi:moshi:1.8.0"
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.8.0"
// Kotlin Coroutines
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------