This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.animation.core.Animatable | |
import androidx.compose.animation.core.exponentialDecay | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.LaunchedEffect | |
import androidx.compose.runtime.Stable | |
import androidx.compose.runtime.remember | |
import androidx.compose.runtime.rememberCoroutineScope | |
import androidx.compose.ui.Modifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import NukeUI | |
struct ImagePager: View { | |
@State private var pagerState: ImagePagerState | |
let imageUrls: [URL] | |
let onDismiss: () -> Void | |
var body: some View { | |
GeometryReader { geometry in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script> | |
var bridge; | |
document.addEventListener('WebViewJavascriptBridgeReady', function onBridgeReady(event) { | |
bridge = event.bridge; | |
bridge.init(function(message, responseCallback) {}); | |
}, false); | |
function runCallbackWithBridge(callback) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.math.* | |
const val size = 15 | |
const val interval = 3 | |
fun main(args: Array<String>) { | |
val center = Point(size / 2, size / 2) | |
repeat(size) { y -> | |
repeat(size) { x -> | |
val distance = Point(x, y).distance(center) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application | |
import android.os.Bundle | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentActivity | |
import androidx.lifecycle.AndroidViewModel | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.ViewModelProvider | |
import androidx.lifecycle.ViewModelProviders | |
fun <T : StateAwareViewModel> FragmentActivity.getStateAwareViewModel( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Dialog | |
import android.content.Context | |
import android.os.Bundle | |
import android.support.v7.app.AlertDialog | |
import android.support.v7.app.AppCompatDialogFragment | |
import android.text.format.DateUtils | |
import android.view.View | |
import android.widget.DatePicker | |
import icepick.Icepick | |
import icepick.State |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint | |
import android.os.Bundle | |
import android.os.Parcelable | |
import android.support.v4.app.Fragment | |
import android.support.v4.app.FragmentManager | |
import android.support.v4.app.FragmentTransaction | |
import android.support.v4.view.PagerAdapter | |
import android.view.View | |
import android.view.ViewGroup |