Skip to content

Instantly share code, notes, and snippets.

import android.arch.lifecycle.ViewModel
import android.os.Looper
import android.support.annotation.CallSuper
import com.google.errorprone.annotations.CheckReturnValue
import com.uber.autodispose.CompletableSubscribeProxy
import com.uber.autodispose.FlowableSubscribeProxy
import com.uber.autodispose.LifecycleNotStartedException
import com.uber.autodispose.MaybeSubscribeProxy
import com.uber.autodispose.ObservableSubscribeProxy
@wajahatkarim3
wajahatkarim3 / ActivitiesLaunchingWay.kt
Last active April 3, 2023 08:12
Kotlin Extensions for simpler, easier and funw way of launching of Activities
/**
* Kotlin Extensions for simpler, easier and funw way
* of launching of Activities
*/
inline fun <reified T : Any> Activity.launchActivity (
requestCode: Int = -1,
options: Bundle? = null,
noinline init: Intent.() -> Unit = {})
{
# update the Apt cache and upgrade the current packages of system
sudo apt update && sudo apt upgrade
# nstall few dependencies required
sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https
# Add the Ondrej PPA
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php