SHARE
TWEET

Untitled

a guest Jun 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. viewHolder.busLineName.setText(tickets.get(position).getBusLine());
  2.     viewHolder.seatsNumbers.setText(String.valueOf(tickets.get(position).getSeatNum()));
  3.     viewHolder.leavingTime.setText(tickets.get(position).getLeavingTime());
  4.     viewHolder.companyName.setText(tickets.get(position).getLeavingTime());
  5.  
  6.     viewHolder.cardView.setOnClickListener(new View.OnClickListener() {
  7.         @Override
  8.         public void onClick(View v) {
  9.             // here passing data to BusInformationCard
  10.             Intent ticketInfo = new Intent(mContext, BusInformationsCard.class);
  11.  
  12.             ticketInfo.putExtra("busLine", tickets.get(position).getBusLine());
  13.             ticketInfo.putExtra("companyName", tickets.get(position).getCompany());
  14.             ticketInfo.putExtra("driverName", tickets.get(position).getName());
  15.             ticketInfo.putExtra("driverPhone", tickets.get(position).getDriverPhone());
  16.             ticketInfo.putExtra("seatNum", tickets.get(position).getSeatNum());
  17.             ticketInfo.putExtra("leavingTime", tickets.get(position).getLeavingTime());
  18.             ticketInfo.putExtra("latitude", tickets.get(position).getLatitude());
  19.             ticketInfo.putExtra("longitude", tickets.get(position).getLongitude());
  20.  
  21.             mContext.startActivity(ticketInfo);
  22.  
  23.         }
  24.     });
  25. }
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