Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1.    public class MyAD extends ArrayAdapter<SvinPauk20.WorldMap> {
  2.  
  3.         private Context mContext;
  4.         private ArrayList<SvinPauk20.WorldMap> myList = new ArrayList();
  5.  
  6.         public MyAD(Context context, ArrayList<SvinPauk20.WorldMap> list) {
  7.             super(context, 0, list);
  8.             mContext = context;
  9.             myList = list;
  10.         }
  11.  
  12.         @Override
  13.         public View getView(int position, View convertView, ViewGroup parent) {
  14.             View listItem = convertView;
  15.             if (listItem == null)
  16.                 listItem = LayoutInflater.from(mContext).inflate(R.layout.layoutr, parent, false);
  17.  
  18.             SvinPauk20.WorldMap Map = myList.get(position);
  19.  
  20.  
  21.             TextView name = listItem.findViewById(R.id.textView);
  22.             name.setText(Map.getcountryW());
  23.  
  24.             TextView release = listItem.findViewById(R.id.textView2);
  25.             release.setText(Map.getcityW());
  26.  
  27.             return listItem;
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement