1

フラグメントコード

//映画のポスターを取得

                String urlPOster = null;

                if (currentMovies.has(KEY_POSTER)) {

                    urlPOster = currentMovies.getString(URL_POSTER +KEY_POSTER);
                }

URL_POSTER と KEY_POSTER

public static final String KEY_POSTER="poster_path";

public static final String URL_POSTER="http://image.tmdb.org/t/p/w500";

tmdb の json フィード

results": [{
"adult": false,
"backdrop_path": "/o4I5sHdjzs29hBWzHtS2MKD3JsM.jpg",
"genre_ids": 
[878,
28,
53,
12],
"id": 87101,
"original_language": "en",
"original_title": "Terminator Genisys",
"overview": "The year is 2029. John Connor, leader of the resistance continues the war against the machines. At the Los Angeles offensive, John's fears of the unknown future begin to emerge when TECOM spies reveal a new plot by SkyNet that will attack him from both fronts; past and future, and will ultimately change warfare forever.",
"release_date": "2015-07-01",
"poster_path": "/5JU9ytZJyR3zmClGmVm9q4Geqbd.jpg",
"popularity": 55.202911,
"title": "Terminator Genisys",
"video": false,
"vote_average": 6.4,
"vote_count": 183},

ここに私のアダプタークラスがあります

    final String urlPoster=currentMovies.getUrlPOster();
    if (urlPoster!=null){

        imageLoader.get(urlPoster, new ImageLoader.ImageListener() {
            @Override
            public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {
                holder.movieThumbnail.setImageBitmap(response.getBitmap());
            }

            @Override
            public void onErrorResponse(VolleyError error) {

            }
        });
4

1 に答える 1