Skip to content

Instantly share code, notes, and snippets.

View vengateshm's full-sized avatar
🏠
Working from home

Vengatesh M vengateshm

🏠
Working from home
View GitHub Profile
@stevdza-san
stevdza-san / DeviceType.kt
Created September 21, 2025 05:54
Adaptive layout in Compose Multiplatform.
import androidx.compose.material3.adaptive.HingeInfo
import androidx.compose.material3.adaptive.WindowAdaptiveInfo
import androidx.window.core.layout.WindowSizeClass
sealed class DeviceType : Comparable<DeviceType> {
abstract val minWidth: Int
abstract val minHeight: Int
abstract val rank: Int
override fun compareTo(other: DeviceType): Int = this.rank - other.rank
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ADB = YOUR_ADB_PATH
PACKAGE_NAME = YOUR_PACKAGE_NAME
MAIN_ACTIVITY = .entry.MainActivity
clean:
./gradlew clean
build:
./gradlew build
@mwolfson
mwolfson / Color.kt
Last active March 27, 2024 07:28
Material Design Color Resources for Jetpack Compose
import androidx.compose.ui.graphics.Color
// Material Color Resources
val amber_050 = Color(0xFFfff8e1) // Use with black text
val amber_100 = Color(0xFFffecb3) // Use with black text
val amber_200 = Color(0xFFffe082) // Use with black text
val amber_300 = Color(0xFFffd54f) // Use with black text
val amber_400 = Color(0xFFffca28) // Use with black text
val amber_500 = Color(0xFFffc107) // Use with black text