git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| import java.util.LinkedHashMap; | |
| import java.util.Map; | |
| import java.util.Set; | |
| public class LinkedHashMapValueByIndexArray { | |
| public static void main(String []args){ | |
| LinkedHashMap<String, Integer> map = new LinkedHashMap<String, Integer>(); | |
| map.put("Qatar", 98814); |
| // Dagger 1 example | |
| @Module( | |
| complete = false, | |
| library = true | |
| ) | |
| public final class ApiModule { | |
| @Provides | |
| @Singleton | |
| Retrofit provideRetrofit(Gson gson, Application app) { | |
| return new Retrofit.Builder() |
| import android.arch.lifecycle.GenericLifecycleObserver | |
| import android.arch.lifecycle.Lifecycle | |
| import android.arch.lifecycle.Lifecycle.Event.ON_DESTROY | |
| import android.arch.lifecycle.LifecycleOwner | |
| import kotlinx.coroutines.experimental.CoroutineScope | |
| import kotlinx.coroutines.experimental.Dispatchers | |
| import kotlinx.coroutines.experimental.Job | |
| import kotlinx.coroutines.experimental.android.Main | |
| fun Lifecycle.createJob(cancelEvent: Lifecycle.Event = ON_DESTROY): Job { |
| 1. hiltvm (applicable in top-level) | |
| @dagger.hilt.android.lifecycle.HiltViewModel | |
| class $NAME$ @javax.inject.Inject constructor( | |
| $PARAM$ | |
| ) : androidx.lifecycle.ViewModel() { | |
| $END$ | |
| } | |
| 2. vmstatefunc (applicable in class) | |
| private val _$NAME$ = androidx.compose.runtime.mutableStateOf<$TYPE$>($INITIAL_VALUE$) |