Skip to content

Instantly share code, notes, and snippets.

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

Yunus Keskin Moozart

🏠
Working from home
View GitHub Profile
@rewhex
rewhex / 1. App.kt
Last active September 26, 2024 15:06
Voyager iOS Swipe back navigation; thanks to @kevinvanmierlo
// commonMain
@Composable
fun App() {
MyApplicationTheme {
Navigator(
screen = InitialScreen(),
disposeBehavior = NavigatorDisposeBehavior(),
onBackPressed = { true },
) {
@kevinvanmierlo
kevinvanmierlo / 0. Voyager Android Predictive Back Gesture And iOS Swipe to go back.md
Last active September 4, 2024 05:56
Voyager Android Predictive Back Gesture And iOS Swipe to go back

This is the gist which explains how to use Android predictive back gesture and iOS swipe to go back when using Voyager in Compose multiplatform.

If you are just using Android, you can merge the commonMain stuff and the androidMain stuff.

@gmk57
gmk57 / 1 ViewBindingDelegates.kt
Last active September 6, 2024 06:45
Kotlin delegates for Android View Binding with usage examples
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.viewbinding.ViewBinding
@Zhuinden
Zhuinden / FragmentViewBindingDelegate.kt
Last active June 20, 2024 14:58
Fragment view binding delegate
// https://github.com/Zhuinden/fragmentviewbindingdelegate-kt
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty