Skip to content

Instantly share code, notes, and snippets.

View skydoves's full-sized avatar
💡
Practice is the only shortcut

Jaewoong Eum skydoves

💡
Practice is the only shortcut
View GitHub Profile
@skydoves
skydoves / activity-lifecycle-phone-call.svg
Last active April 23, 2026 00:45
Binary XML Format Diagram for dove-letter interview
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skydoves
skydoves / build.gradle.kts
Created March 31, 2026 00:59
Compose HotSwan - SDK documentation mode configuration
hotSwanCompiler {
preview {
outputDir.set(".hotswan/preview-captures")
renderDelayMs.set(2500L)
sdkModeEnabled.set(true)
}
}
@skydoves
skydoves / capture-previews.sh
Created March 31, 2026 00:59
Compose HotSwan - Capture all previews
./gradlew captureAllPreviews
@skydoves
skydoves / build.gradle.kts
Last active April 3, 2026 09:28
Compose HotSwan - Preview Runner setup
dependencies {
debugImplementation("com.github.skydoves.compose.hotswan:preview:1.1.3")
}
@skydoves
skydoves / User.kt
Created March 31, 2026 00:59
Compose HotSwan - Data class property addition
data class User(
val firstName: String,
val lastName: String,
val avatarUrl: String // Newly added property
)
@skydoves
skydoves / strings.xml
Created March 31, 2026 00:59
Compose HotSwan - Resource value hot reload
<!-- strings.xml -->
<string name="welcome_message">Welcome back</string>
<!-- Change to: "Hey there, welcome back" and save -->
@skydoves
skydoves / ProfileViewModel.kt
Last active March 31, 2026 02:27
Compose HotSwan - Non-composable function hot reload
class ProfileViewModel : ViewModel() {
// add a new function in your ViewModel
fun formatDisplayName(user: User): String {
// Change the formatting logic and save
return "${user.firstName} ${user.lastName}"
}
}
@Composable
@skydoves
skydoves / NewComposable.kt
Created March 31, 2026 00:59
Compose HotSwan - Adding new composable functions
@Composable
fun ProfileCard(user: User) {
Column {
UserAvatar(user) // New composable, defined below
Text(text = user.name)
}
}
@Composable
fun UserAvatar(user: User) {
@skydoves
skydoves / ProfileCard.kt
Created March 31, 2026 00:59
Compose HotSwan - ProfileCard composable example
@Composable
fun ProfileCard(user: User) {
Column(
modifier = Modifier
.padding(24.dp) // Change this to 16.dp and save
.fillMaxWidth()
) {
Text(
text = user.name,
fontSize = 20.sp, // Change this to 24.sp and save
@skydoves
skydoves / AllPluginsCombined.kt
Created March 28, 2026 01:15
Putting it all together - five plugins combined
LandscapistImage(
imageModel = { imageUrl },
component = rememberImageComponent {
+ShimmerPlugin()
+CircularRevealPlugin(duration = 350)
+PalettePlugin(
paletteLoadedListener = { palette ->
dominantColor = palette.dominantSwatch?.rgb
},
)