WIP on adding navigation between Omnipod fragments in replace Pod wizard
This commit is contained in:
parent
ca4d809f41
commit
779124f8b9
|
@ -354,12 +354,6 @@ dependencies {
|
|||
|
||||
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
||||
|
||||
// Navigation
|
||||
implementation "androidx.navigation:navigation-fragment:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui:$nav_version"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||
|
||||
//WorkManager
|
||||
implementation 'androidx.work:work-runtime:2.3.4'
|
||||
implementation 'androidx.work:work-runtime-ktx:2.3.4'
|
||||
|
|
|
@ -75,7 +75,6 @@ dependencies {
|
|||
implementation 'androidx.core:core-ktx:1.2.0'
|
||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
||||
implementation "androidx.activity:activity-ktx:${activityVersion}"
|
||||
implementation "androidx.fragment:fragment:${fragmentVersion}"
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
|
||||
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.3'
|
||||
|
@ -100,8 +99,6 @@ dependencies {
|
|||
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
||||
|
||||
// Navigation
|
||||
implementation "androidx.navigation:navigation-fragment:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui:$nav_version"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||
|
||||
|
|
|
@ -7,7 +7,14 @@ import dagger.Module
|
|||
import dagger.Provides
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import dagger.multibindings.IntoMap
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.WizardFragment1
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.action.DeactivatePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.action.InsertCannulaActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.action.PairAndPrimePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.info.AttachPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.info.DeactivatePodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.info.FillPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.info.PodDeactivatedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.fragment.info.PodReplacedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.viewmodel.WizardViewModel1
|
||||
import javax.inject.Provider
|
||||
|
||||
|
@ -29,18 +36,41 @@ abstract class OmnipodWizardModule {
|
|||
@OmnipodPluginQualifier
|
||||
@ViewModelKey(WizardViewModel1::class)
|
||||
internal abstract fun bindWizardViewModel1(viewModel: WizardViewModel1): ViewModel
|
||||
|
||||
// Add the rest of the view models
|
||||
|
||||
|
||||
|
||||
// #### FRAGMENTS ##############################################################################
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesWizardFragment1(): WizardFragment1
|
||||
internal abstract fun contributesDeactivatePodActionFragment(): DeactivatePodActionFragment
|
||||
|
||||
// Add the rest of the fragments
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesInsertCannulaActionFragment(): InsertCannulaActionFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesPairAndPrimePodActionFragment(): PairAndPrimePodActionFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesAttachPodInfoFragment(): AttachPodInfoFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesDeactivatePodInfoFragment(): DeactivatePodInfoFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesFillPodInfoFragment(): FillPodInfoFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesPodDeactivatedInfoFragment(): PodDeactivatedInfoFragment
|
||||
|
||||
@FragmentScope
|
||||
@ContributesAndroidInjector
|
||||
internal abstract fun contributesPodReplacedInfoFragment(): PodReplacedInfoFragment
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FragmentContainerView
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/omnipod_replace_pod_wizard_navigation_graph"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/omnipod_replace_pod_wizard_navigation_graph" />
|
||||
|
||||
</LinearLayout>
|
|
@ -4,13 +4,9 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/omnipod_wizard_info_page_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
|
@ -42,6 +42,9 @@
|
|||
<action
|
||||
android:id="@+id/action_pairAndPrimePodActionFragment_to_attachPodInfoFragment"
|
||||
app:destination="@id/attachPodInfoFragment" />
|
||||
<action
|
||||
android:id="@+id/action_pairAndPrimePodActionFragment_to_deactivatePodInfoFragment"
|
||||
app:destination="@id/deactivatePodInfoFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/attachPodInfoFragment"
|
||||
|
@ -58,6 +61,9 @@
|
|||
<action
|
||||
android:id="@+id/action_insertCannulaActionFragment_to_podReplacedInfoFragment"
|
||||
app:destination="@id/podReplacedInfoFragment" />
|
||||
<action
|
||||
android:id="@+id/action_insertCannulaActionFragment_to_deactivatePodInfoFragment"
|
||||
app:destination="@id/deactivatePodInfoFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/podReplacedInfoFragment"
|
||||
|
|
Loading…
Reference in a new issue