Cardview with multiple images

Asked

Viewed 176 times

0

Could someone help me as I do for each card of that ai exchange the images using the library ?

Carviews com várias imagens

  • Have you seen the official documentation? In the first paragraph there is an example in a line of how to download an image and place in an Imageview.

  • If you’ve made this list and you’re displaying these images what you just have to do is have the images on an Arry list and run them on the . Picasso load going through the list... if you want to edit your question put the part of code you made that list, and I later put an answer.

  • @Pabloalmeida Yes man this is easy. I want to know to put in a listview.

1 answer

2

Try onBindViewHolder that even in the example below, it will work. But I believe there are alternatives with better performance.

  @Override
public void onBindViewHolder(MovieViewHolder holder, int position) {

        //holder.mTextViewTitle.setText(mMovies.getJSONObject(position).get("id").toString());
        holder.mTextViewTitle.setText(mMovies.get(position).getmTitle());

        holder.idItem = mMovies.get(position).getmId();


        Picasso.with(holder.context).load("http://image.tmdb.org/t/p/w500/" +
            mMovies.get(position).getmPosterPath())
            .into(holder.mMovieImageView);

}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.