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 com.myapplication.domain.model.checkout.CartItem | |
import com.myapplication.helper.rx.ThreadConfinedBehaviorSubject | |
import io.reactivex.Scheduler | |
import java.math.BigInteger | |
import javax.annotation.concurrent.ThreadSafe | |
import javax.inject.Inject | |
import javax.inject.Singleton | |
/** | |
* Beware!! |
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 androidx.annotation.IdRes | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentActivity | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.ViewModelProvider | |
import androidx.navigation.fragment.findNavController | |
/** | |
* This extension is best used when using |
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.thegar.helper | |
import android.annotation.SuppressLint | |
import android.graphics.PixelFormat | |
import android.os.Build | |
import android.os.Bundle | |
import android.view.* | |
import android.widget.FrameLayout | |
import android.widget.ScrollView | |
import androidx.annotation.CallSuper |
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
@file:Suppress("UNCHECKED_CAST") | |
package com.thegar.example.helper.viewmodel | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MediatorLiveData | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.SavedStateHandle | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty |
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
@file:Suppress("UNCHECKED_CAST") | |
package com.thegar.helper | |
import android.os.Bundle | |
import androidx.activity.viewModels | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentActivity | |
import androidx.fragment.app.activityViewModels | |
import androidx.fragment.app.viewModels | |
import androidx.lifecycle.AbstractSavedStateViewModelFactory |
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 dagger.Component | |
import javax.inject.Inject | |
import javax.inject.Scope | |
@Scope | |
@Retention(AnnotationRetention.RUNTIME) | |
annotation class TutorialScope | |
@Component | |
@TutorialScope |
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
@Singleton | |
class Contoh @Inject constructor(private val anakContoh: AnakContoh){ |
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 | |
import android.util.Log | |
import androidx.appcompat.app.AppCompatActivity | |
import javax.inject.Inject | |
class MainActivity : AppCompatActivity() { | |
@Inject lateinit var contoh: Contoh | |
override fun onCreate(savedInstanceState: Bundle?) { |
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 dagger.Component | |
import javax.inject.Inject | |
import javax.inject.Singleton | |
@Component | |
@Singleton | |
interface TutorialComponent { | |
val contohMelaluiComponent : Contoh | |