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.net.Uri | |
import androidx.core.net.toUri | |
//This is a object, something that has uninterable identity, here the id is deeplink. | |
class DeeplinkObject( | |
val deeplink: String | |
) { | |
private val asUri = deeplink.toUri() |
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.reactivex.Scheduler | |
import io.reactivex.android.schedulers.AndroidSchedulers | |
import io.reactivex.schedulers.Schedulers | |
class DefaultSchedulerProvider : SchedulerProvider { | |
override fun io(): Scheduler = Schedulers.io() | |
override fun ui(): Scheduler = AndroidSchedulers.mainThread() | |
override fun computation(): Scheduler = Schedulers.computation() | |
override fun trampoline(): Scheduler = Schedulers.trampoline() |
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 kotlin.random.Random | |
import kotlin.reflect.KMutableProperty | |
import kotlin.reflect.KProperty | |
fun <T> Array<T>.aElement(): T { | |
require(this.isNotEmpty()) | |
return this[Random.nextInt(0, size - 1)] | |
} | |
fun aBoolean(random: Random = Random): Boolean { |
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
package com.nasserkhosravi.uikit | |
import android.text.Editable | |
import android.text.SpannableStringBuilder | |
import android.text.TextWatcher | |
import android.widget.EditText | |
import android.widget.TextView | |
/** | |
* Your [EditText] should have ltr layout direction |