SimpleCursorAdapter Problem

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

SimpleCursorAdapter Problem

Postby ak_ » Sun May 17, 2009 8:59 am

I have two cursor, one of them from contact content provider, other one from database. id fields are sycnhorinzed.
i want to show them in same column with two row in list.
i m think that i have to use simpleCursorAdapter, because arrayadapter and other adapters can not show two cursor in a list.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. <span style="color: red">simpleCursorAdapter=new SimpleCursorAdapter(this,R.layout.row,matrixCursor,new String[]{matrixCursor.getColumnName(1),matrixCursor.getColumnName(2)},new int[]{R.id.TextView01,R.id.TextView02});</span>
Parsed in 0.032 seconds, using GeSHi 1.0.8.4

my problem is "simpleCursorAdapter.notifyDataSetChanged();" is not working.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. protected void onResume() {
  2.  
  3.        
  4.  
  5.         cursor2.requery();
  6.  
  7.         cursor3=myDbAdapter.getAll();    
  8.  
  9.         System.out.println("ak_:Onresumed");
  10.  
  11.         simpleCursorAdapter.notifyDataSetChanged();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


so my list is not refresing/updating altough all cursors all results are updating.
Is there any idea?
Software Developer
ak_
Freshman
Freshman
 
Posts: 4
Joined: Tue Apr 14, 2009 7:26 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests