Skip to content

Instantly share code, notes, and snippets.

View Kashif-E's full-sized avatar
:octocat:

Kashif Mehmood Kashif-E

:octocat:
View GitHub Profile
@bmc08gt
bmc08gt / 1_Keyboard.kt
Last active May 13, 2025 13:34
KMP Software Keyboard Controller
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.SoftwareKeyboardController
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
public abstract class KeyboardController(
@fvilarino
fvilarino / draggable_content_final.kt
Created June 22, 2023 18:56
Draggable Contente - Final
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
PlaygroundTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background,
) {
Box {
@hmlongco
hmlongco / Themes.swift
Last active January 10, 2023 06:54
Themes for SwiftUI
struct Colors {
let primary: Color
}
struct Fonts {
let body: Font
}
class Theme: ObservableObject {
let color: Colors
@mmobin789
mmobin789 / InternetMonitor.kt
Last active July 29, 2021 10:41
An Internet Monitor class which can be registered in Android to listen for internet connectivity states.
import android.annotation.TargetApi
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkRequest
import android.os.Build
/**