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
@file:Suppress("unused") | |
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 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="fr.delcey.go4lunch"> | |
<application | |
... | |
> | |
<activity | |
android:name=".view.dispatcher.DispatcherActivity" |
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
public class MapFragment extends SupportMapFragment { | |
public static MapFragment newInstance() { | |
return new MapFragment(); | |
} | |
private MapViewModel viewModel; | |
private GoogleMap googleMap; |
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 kotlinx.coroutines.* | |
import java.io.IOException | |
object MultipleDetailsDemo { | |
@JvmStatic | |
fun main(args: Array<String>) = runBlocking { | |
val start = System.currentTimeMillis() | |
val detailEntities: List<DetailEntity> = try { | |
val ids = listOf(0, 1, 2) |
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.time.Duration | |
import kotlin.time.Duration.Companion.seconds | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.channels.BufferOverflow | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.MutableSharedFlow | |
import kotlinx.coroutines.flow.combine | |
import kotlinx.coroutines.flow.distinctUntilChanged | |
import kotlinx.coroutines.launch |
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.time.Duration | |
import kotlin.time.Duration.Companion.seconds | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.channels.BufferOverflow | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.MutableSharedFlow | |
import kotlinx.coroutines.flow.combine | |
import kotlinx.coroutines.flow.distinctUntilChanged | |
import kotlinx.coroutines.launch |
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 kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.* | |
import org.junit.rules.TestRule | |
import org.junit.runner.Description | |
import org.junit.runners.model.Statement | |
@ExperimentalCoroutinesApi | |
class TestCoroutineRule : TestRule { | |
val testCoroutineDispatcher = UnconfinedTestDispatcher() |
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 kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.runBlockingTest | |
import kotlinx.coroutines.test.setMain | |
import org.junit.rules.TestRule | |
import org.junit.runner.Description | |
import org.junit.runners.model.Statement |
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
Intent intent = MeetingDetailActivity.navigate(this, meetingId); | |
Pair<View, String> imageViewPair = new Pair<>(imageView, imageView.getTransitionName()); | |
Pair<View, String> textViewPair = new Pair<>(textView, textView.getTransitionName()); | |
@SuppressWarnings("unchecked") | |
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation( | |
this, | |
imageViewPair, | |
textViewPair |
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
@ColorRes | |
fun getTypeColorRes(type: String?): Int? = when (type) { | |
"normal" -> R.color.type_normal | |
"fire" -> R.color.type_fire | |
"water" -> R.color.type_water | |
"electric" -> R.color.type_electric | |
"grass" -> R.color.type_grass | |
"ice" -> R.color.type_ice | |
"fighting" -> R.color.type_fighting |
NewerOlder