SHARE
TWEET

Untitled

a guest Dec 9th, 2019 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TicketPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
  2.  
  3.   private val tickets = ArrayList<DriveLicenseModel>()
  4.  
  5.   override fun getItem(position: Int): Fragment {
  6.     return TicketFragment.newInstance(tickets[position])
  7.   }
  8.  
  9.   override fun getCount() = tickets.size
  10.  
  11.   override fun getPageTitle(position: Int): CharSequence? {
  12.     return tickets[position].ticket.ticketNumber.toString()
  13.   }
  14.  
  15.   fun setTickets(tickets: List<DriveLicenseModel>){
  16.     this.tickets.clear()
  17.     this.tickets.addAll(tickets)
  18.   }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top