Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GridListAdapter extends BaseAdapter {
- private Context context;
- private List<Movies_Variables>mListmovies;
- public GridListAdapter(Context context,List<Movies_Variables>mListmovies){
- this.context=context;
- this.mListmovies=mListmovies;
- }
- @Override
- public int getCount() {
- return mListmovies.size();
- }
- @Override
- public Object getItem(int position) {
- return mListmovies.get(position);
- }
- @Override
- public long getItemId(int position) {
- return position;
- }
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View v=View.inflate(context,R.layout.grid_item,null);
- ImageView movie_image=(ImageView)v.findViewById(R.id.grid_item_image_view);
- //////////////////////////////////
- ////////////////Add picasso
- Picasso.with(context).load(mListmovies.get(position).getPoster_path()).into(movie_image);
- Picasso.with(context).setLoggingEnabled(true);
- return v;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement