Skip to content

Commit

Permalink
adds navigation to new fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
artwist-polyakov committed Apr 21, 2024
1 parent 9d38d98 commit 41a78e9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class UikitSampleFragment :
binding.testFragmentButton.setOnClickListener {
findNavController().navigate(R.id.action_uikitSampleFragment_to_testFragment)
}

binding.codeConfirmationFragmentButton.setOnClickListener {
findNavController().navigate(R.id.action_uikitSampleFragment_to_codeConfirmationFragment)
}
}

override fun onSubscribe() {
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/layout/fragment_uikit_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,14 @@
app:layout_constraintEnd_toEndOf="@+id/fifth_diagram_button"
app:layout_constraintStart_toStartOf="@+id/fifth_diagram_button"
app:layout_constraintTop_toBottomOf="@+id/fifth_diagram_button" />

<Button
android:id="@+id/code_confirmation_fragment_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="Code confirmation"
app:layout_constraintEnd_toEndOf="@+id/test_fragment_button"
app:layout_constraintStart_toStartOf="@+id/test_fragment_button"
app:layout_constraintTop_toBottomOf="@+id/test_fragment_button" />
</androidx.constraintlayout.widget.ConstraintLayout>
9 changes: 9 additions & 0 deletions app/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@
<action
android:id="@+id/action_uikitSampleFragment_to_testFragment"
app:destination="@id/testFragment" />
<action
android:id="@+id/action_uikitSampleFragment_to_codeConfirmationFragment"
app:destination="@id/codeConfirmationFragment" />
</fragment>
<fragment
android:id="@+id/firstDiagramFragment"
Expand Down Expand Up @@ -419,4 +422,10 @@
android:name="app.cashadvisor.authorization.presentation.ui.test.TestFragment"
android:label="fragment_test"
tools:layout="@layout/fragment_test" />

<fragment
android:id="@+id/codeConfirmationFragment"
android:name="app.cashadvisor.authorization.presentation.ui.demo.CodeConfirmationFragment"
android:label="fragment_code_confirmation"
tools:layout="@layout/fragment_code_confirmation" />
</navigation>

0 comments on commit 41a78e9

Please sign in to comment.