Skip to content

Instantly share code, notes, and snippets.

@wirasetiawan29
Created February 2, 2016 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wirasetiawan29/39e846cb09bcaa117b50 to your computer and use it in GitHub Desktop.
Save wirasetiawan29/39e846cb09bcaa117b50 to your computer and use it in GitHub Desktop.
@Override
publicView getView(intitempos, View convertView, ViewGroup parent) {
//Mengecek jika convertview = null, jika null maka menjalan View.inflate
if (convertView == null){
convertView = View.inflate (context,R.layout.list_content_layout, null);
}
//Jika tidak sama dengan null, kita bisa menggunakan kembali dari recycler
TextView txtcontent = (TextView) convertView.findViewById(R.id.textView1);
ImageView imgcontent = (ImageView) convertView.findViewById(R.id.imageView1);
Paintings paintingcontent = content [itempos];
txtcontent.setText (paintingcontent.imagetitle);
imgcontent.setImageResource(paintingcontent.drawableresid);
returnconvertView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment