Meggy Peter

Meggy Peter

  • NA
  • 32
  • 3.2k

How to add items into List view and click on item go to detail view?

Apr 24 2023 5:50 PM

I have two fragment 1. Test Fragment 2. Test Detail Fragment

1. Test Fragment I would like to display 

  1. Test 1  - 15/9/23 9:00(current date and time)
  2. Test 2 -  15/9/23 9:15(current date and time)

2. Test Detail Fragment I wiould like to display

  1.  Clicking on item one from the List view it will look like this
    1. Test1 (name of list view item)
    • 1. abc2 - 12s,
    • 2. abc2 -10s,
    • 3. abc3 - 30s

In my kotlin app with room database entity Test and TestDetails. How do i create dao and view model and get that value into fragment?

 


Answers (2)