SimpleCursorAdapter with ViewBinder - No Images

All your problems with Audio, Video and Images.

SimpleCursorAdapter with ViewBinder - No Images

Postby Markus » Tue Jun 23, 2009 6:55 pm

Hallo,

i wan't to display the last 10 sms from my inbox with the contactphoto. I've got a SimpleCursorAdapter for a ListView, which loads an XML-Layout with various TextViews and an ImageView.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,R.layout.sms_row,c,columns, to);
  3.  
  4. adapter.setViewBinder(new SmsViewBinder(this, false));
  5.  
  6.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


SmsViewBinder implements the SimpleCursorAdapter.ViewBinder but I can't access the ImageView :-(

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
  3.  
  4.   Log.v("instanceof","-"+view.getClass());
  5.  
  6. }
  7.  
  8.  
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


Log:
- class android.widget.TextView
- class android.widget.TextView
- class android.widget.TextView
...

No ImageViews :-( Can somebody help?
Markus
Freshman
Freshman
 
Posts: 6
Joined: Sat Jun 13, 2009 10:24 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 11 guests