Переглянути джерело

1.添加获取mmse试题库UI跳转

王鹏鹏 2 роки тому
батько
коміт
9050e6b4b3

+ 8 - 2
mmse/src/main/java/com/yingyangfly/mmse/fragment/MemoryWordsFragment.kt

@@ -20,14 +20,20 @@ class MemoryWordsFragment : BaseFragment<FragmentMemoryWordsBinding>() {
     override fun initListener() {
         binding {
             btnPrevious.setOnSingleClickListener {
-
+                val bundle = Bundle()
+                bundle.putInt("questionId", 30)
+                val controller = Navigation.findNavController(it)
+                controller.navigate(
+                    R.id.action_memoryWordsFragment_to_recognitionImageFragment,
+                    bundle
+                )
             }
             btnNext.setOnSingleClickListener {
                 val bundle = Bundle()
                 bundle.putInt("questionId", 19)
                 val controller = Navigation.findNavController(it)
                 controller.navigate(
-                    R.id.action_soundRecordFragment_to_multipleChoiceFragment,
+                    R.id.action_memoryWordsFragment_to_multipleChoiceFragment,
                     bundle
                 )
             }

+ 6 - 1
mmse/src/main/res/navigation/nav_home.xml

@@ -193,6 +193,11 @@
         android:id="@+id/memoryWordsFragment"
         android:name="com.yingyangfly.mmse.fragment.MemoryWordsFragment"
         android:label="memoryWordsFragment">
-
+        <action
+            android:id="@+id/action_memoryWordsFragment_to_multipleChoiceFragment"
+            app:destination="@id/multipleChoiceFragment" />
+        <action
+            android:id="@+id/action_memoryWordsFragment_to_recognitionImageFragment"
+            app:destination="@id/recognitionImageFragment" />
     </fragment>
 </navigation>