This file contains 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"?> | |
<androidx.constraintlayout.motion.widget.MotionLayout | |
android:layout_height="match_parent" | |
android:layout_width="match_parent" | |
app:layoutDescription="@xml/motion_scene" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<View | |
android:id="@+id/header" |
This file contains 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
[ | |
{ | |
"DESCIUDAD": "AHUACHAPAN", | |
"CODDEPTO": 1, | |
"CODCIUDAD": 1 | |
}, | |
{ | |
"DESCIUDAD": "APANECA", | |
"CODDEPTO": 1, | |
"CODCIUDAD": 2 |
This file contains 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
[ | |
{ | |
"DESDEPTO": "AHUACHAPAN", | |
"CODDEPTO": 1 | |
}, | |
{ | |
"DESDEPTO": "SANTA ANA", | |
"CODDEPTO": 2 | |
}, | |
{ |
This file contains 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
class ChangeOutlineRadiusTransition( | |
private val startRadius: Int, | |
private val endRadius: Int | |
) : Transition() { | |
private companion object { | |
/** | |
* Unique key for start and end values to be kept in [TransitionValues] [TransitionValues] | |
*/ | |
private const val RADIUS = "ChangeOutlineRadiusTransition:outlineRadius" |
This file contains 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
/** | |
* Observable manager for saving the [Cart]'s resource information. | |
*/ | |
class CartManager : LiveData<Resource<Cart?>>() { | |
init { | |
value = Success(null) | |
} | |
/** |
This file contains 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
<ScrollView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layoutAnimation="@anim/layout_animation" | |
android:orientation="vertical"> | |
</ScrollView> |
This file contains 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 io.realm.* | |
import io.realm.kotlin.where | |
import kotlinx.coroutines.GlobalScope | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.resumeWithException | |
private suspend fun <T: RealmObject, S: RealmQuery<T>> findAllAwait(query: S): RealmResults<T> = suspendCancellableCoroutine { continuation -> | |
val listener = RealmChangeListener<RealmResults<T>> { t -> continuation.resume(t) } |
This file contains 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.os.RemoteException; | |
import com.google.android.gms.maps.GoogleMap; | |
import com.google.android.gms.maps.OnMapReadyCallback; | |
import com.google.android.gms.maps.internal.IGoogleMapDelegate; | |
import com.google.android.gms.maps.internal.zzaq; | |
final class SupportMapCallback extends zzaq { | |
private OnMapReadyCallback mMapCallback; |
This file contains 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.os.Bundle | |
// Dunno if there's a better way to extend both bundle and intents, but | |
// you probably can extend intents in the same way | |
fun Bundle.putEnum(key:String, enum: Enum<*>){ | |
putString(key, enum.name) | |
} | |
inline fun <reified T: Enum<T>> Bundle.getEnum(key:String): T { |
NewerOlder