Help with myListAdapter
Hello,
I have a problem to list data from my query.
screen appears in black.
my query:
public static Cursor fetchProduct(String dRecogido) throws SQLException {
Cursor cursor =
mDb.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CODE,
KEY_NOME, KEY_PRICE }, KEY_NAME + "=" + "'"+ dRecogido +"'", null, null, null,
null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
and my SimpleCursorAdapter
private void showData() {
mCursor = ProductsDdAdapter.fetchProduct
startManagingCursor(mCursor);
String[] from = new String[] { ProductsDdAdapter.KEY_CODE,
ProductsDdAdapter.KEY_NAME, ProductsDdAdapter.KEY_PRICE };
int[] to = new int[] { R.id.textCODIGO, R.id.textNOMBRE,
R.id.textPRECIO };
SimpleCursorAdapter la = new SimpleCursorAdapter(this, R.layout.listodatos, mCursor, from, to);
setListAdapter(la);
}
Did I do wrong?
Or I needed to do?
thanks
best regards
Way back in Pandora I was approached by Sid’s mother to do a book about Sid Vicious, obviously. With Pandora Bracelets crystal ball in one hand
I don't see a black screen - just nothing happened?
Matthew Lawrence Bonner
Data Recovery Services
Thank you for this code, I'd also need! I can now move forward!
Thank you,
New Moon
I have not seen this query before, but I am new to the Droid as well. I am working on some applications for it, but I am still learning a lot also. I will look around for some more info for you to see what I can find. Multivariate Testing
Hi!
I can not find specific errors in youor code, are you sure there is a (visible) ListView for the setListAdapter command, and there are records in the database?
Hi,
Thanks for your help,
I want that when users type a title, displayed on screen titles that match.
Now I have another project following this tutorial, but now I have some problems when I change the ROWID for the variable that contains the text that the user types.
I put the code:
MainActivity.java
package com.miproyecto;
2 MuestraDatos.java
New tutorials from Helloandroid
Recent Apps
Android on Twitter
-
@aSioooooooooooo (오정수)
I have just discovered territory 1 in My Railway! You can get it for FREE on Android! http://t.co/BbC5qGPf #android #androidgames
9 hours 11 min ago -
@NicoLu3 (Nico Lu)I have just discovered territory 2 in My Railway! You can get it for FREE on Android! http://t.co/8nzoaH96 #android #androidgames
9 hours 11 min ago -
@jcodyv (James Vanderlois)I have just reached level 10 in My Railway! You can get it for FREE on Android! http://t.co/B34D0Anu #android #androidgames
9 hours 11 min ago -
@NotSo1nt3restin (Eli Lucero)RT @androidcentral: No, RIM's CEO didn't say BlackBerry apps are more profitable than Android or iOS http://t.co/7LcLEUxk #android
9 hours 12 min ago -
@NicoLu3 (Nico Lu)I have just reached level 12 in My Railway! You can get it for FREE on Android! http://t.co/8nzoaH96 #android #androidgames
9 hours 12 min ago
Poll
Useful resources
Android Development Projects
- Mobile app coder needed for quick, simple app by Ergometrix
- Simple homework app by hlafort
- Multiple Choice Quiz (iPhone, Android) by Ascen
- convert images for our iPhone app to be Android compatible by tbiadmin
- Nonpublic project #1433189 by ysimonis
- Nonpublic project #1433117 by hitekllc
- ushownow.com by hassoun911
- Making an App for iPhone/iPad and Android by HorizonCHS
- iPhone and Android apps by phpdotnetguy
- Phone Finder Android Ready to sale app by theneoenderson



Banyan/today a discount prada bags gold and silver silk tired