Back to project page BlurNavigationDrawer.
The source code is released under:
Apache License
If you think the Android project BlurNavigationDrawer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.charbgr.BlurNavigationDrawer.sample.app; // ww w . j a v a2s. c o m import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; /** * Created by charbgr on 8/30/14. */ public class MovieAdapter extends BaseAdapter { private ArrayList<Movie> movies; private Context context; public MovieAdapter(Context context, ArrayList<Movie> movies) { this.context = context; this.movies = movies; } @Override public int getCount() { return movies.size(); } @Override public Movie getItem(int position) { return movies.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { Movie movie = getItem(position); ImageView imageView; TextView textView; if(convertView == null){ LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(R.layout.movie_item, parent, false); } imageView = (ImageView)convertView.findViewById(R.id.picture); textView = (TextView)convertView.findViewById(R.id.text); imageView.setImageDrawable(movie.getDrawable()); textView.setText(movie.getTitle()); return convertView; } }