Commit 8cee5e74 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

test snackbar pipeline

parent faa2c7ce
......@@ -14,9 +14,11 @@ import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.base.ICollapsingToolBar
import com.biganto.visual.roompark.base.RoomParkMainActivity
import com.biganto.visual.roompark.conductor.mosby.mvi.BigantoMviController
import com.biganto.visual.roompark.di.dagger.ActivityModule
import com.biganto.visual.roompark.view_utils.snackbar.ISnackBarProvider
import com.hannesdorfmann.mosby3.mvi.MviBasePresenter
import io.reactivex.disposables.CompositeDisposable
import timber.log.Timber
/**
* Created by Vladislav Bogdashkin on 28.05.2018.
......@@ -33,8 +35,6 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
abstract override fun createPresenter(): P
abstract fun getSnackBar(): ISnackBarProvider
@LayoutRes
protected abstract fun getLayoutId(): Int
......@@ -68,8 +68,12 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
val view = inflater.inflate(getLayoutId(), container, false)
// instantiate the view
ButterKnife.bind(this, view)
toolBar= activity as RoomParkMainActivity
snackbar= getSnackBar()
Timber.d(" ACTIVITY IS : ${activity?.localClassName} / ${activity?.localClassName}")
(activity as RoomParkMainActivity).let{
snackbar = ActivityModule.provideSnackBar(it)
toolBar = it
}
return view
}
......
package com.biganto.visual.roompark.presentation.screen.splash
import DaggerSplashScreenComponent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.base.RoomParkApplication
import com.biganto.visual.roompark.base.RoomParkMainActivity
import com.biganto.visual.roompark.conductor.BigantoBaseController
import com.biganto.visual.roompark.view_utils.snackbar.SnackBarProvider
import com.google.android.material.snackbar.Snackbar
/**
* Created by Vladislav Bogdashkin on 30.09.2019.
......@@ -16,16 +20,20 @@ class SplashScreenController :
, SplashScreenPresenter>()
, SplashScreen {
// @Inject
// lateinit var rpActivity:RoomParkMainActivity
lateinit var rpActivity: RoomParkMainActivity
fun getComponent() = DaggerSplashScreenComponent
.factory()
.create(RoomParkApplication.component,this)
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup): View {
val v = super.onCreateView(inflater, container)
override fun getSnackBar() = SnackBarProvider(activity!!)//getComponent().snack(activity)
rpActivity = activity as RoomParkMainActivity
snackbar.showSnackBar("AZZZA", Snackbar.LENGTH_LONG)
return v
}
override fun render(viewState: SplashScreenViewState) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
......
......@@ -42,6 +42,8 @@ interface SplashScreenComponent {
}
val presenter: SplashScreenPresenter
// val roomParkActivity: RoomParkMainActivity
// val snackBar : ISnackBarProvider
}
......
......@@ -13,7 +13,6 @@ import javax.inject.Inject
*/
class SnackBarProvider @Inject constructor(val activity: Activity) : ISnackBarProvider {
override val isRootBounded: Boolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment