ListView not touchable in my Activity - A clue...not the solution though..

by monn3t » Sat, 11 Apr 2009 09:06:44 GMT


Sponsored Links
 Thanks for answering...

I ended descontructing the whole Activity until I came across what
seems to be the cause of the problem.

When creating the SimpleCursorAdapter I use: R.layout.row which is a
layout that I created.
When I use one of android's, for instance:
android.R.layout.simple_list_item_1, it works but it does not show
what I need on screen.

If anybody can help... I'd appreciate it.  Thanks!

You don't see any itemClickListener because I post part of the
code...this is what I missed.

@Override
    protected void onListItemClick(ListView l, View v, int position,
long id){
     super.onListItemClick(l, v, position, id);

     Cursor c = (Cursor) this.getListAdapter().getItem(position);

     this.var1=c.getString(1);
     this.var2=c.getString(2);
     this.var3=c.getString(3);
     this.var4=c.getString(4);

     Intent nextActivity = new Intent(Activity_CardList.this,
Activity_ViewCard.class);
     nextActivity.putExtra("var1", var1);
     startActivity(nextActivity);
    }



--~--~---------~--~----~------------~-------~--~----~



ListView not touchable in my Activity - A clue...not the solution though..

by Chander Pechetty » Sat, 11 Apr 2009 16:10:50 GMT


 As you mentioned, you are not posting the details for anyone to answer
your question?
You have not pasted the layout; so again no one can answer, but have a
look at the API doc...
 http://developer.android.com/reference/android/widget/SimpleCursorAdapter.html #SimpleCursorAdapter(android.content.Context,%20int,%20android.database.Cursor,%20java.lang.String[],%20int[])

to see if you are passing the "to", "from" correctly...

Cheers,
Chander


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Geting SMS Center number

Is it possible to get current SMS Center number inside application on
android?

--~--~---------~--~----~------------~-------~--~----~

2. exception

Hello,

I am retrieving data from database after particular time in service.
For sometimes it works perfectly but after some time it used to give
following exception. Can some one tell me what can be wrong in it ?



E/JavaBinder(  142): java.lang.RuntimeException: No memory in memObj
E/JavaBinder(  142):    at android.database.CursorWindow.native_init
(Native Meth
od)
E/JavaBinder(  142):    at android.database.CursorWindow.<init>
(CursorWindow.jav
a:467)
E/JavaBinder(  142):    at android.database.CursorWindow.<init>
(CursorWindow.jav
a:27)
E/JavaBinder(  142):    at android.database.CursorWindow
$1.createFromParcel(Curs
orWindow.java:442)
E/JavaBinder(  142):    at android.database.CursorWindow
$1.createFromParcel(Curs
orWindow.java:445)
E/JavaBinder(  142):    at
android.content.ContentProviderNative.onTransact(Cont
entProviderNative.java:95)
E/JavaBinder(  142):    at android.os.Binder.execTransact(Binder.java:
287)
E/JavaBinder(  142):    at dalvik.system.NativeStart.run(Native
Method)
E/3       (  337): 3
E/Exception(  337): java.lang.NullPointerException
I/DumpStateReceiver(   74): Added state dump to 1 crashes
E/in readData(  337): in readData
E/1       (  337): 1
E/2       (  337): 2
E/IM

--~--~---------~--~----~------------~-------~--~----~

3. Is their any way to debug the native sources from eclipse ?

4. Question about app widgets

5. hasExtra fails when there is no Extra in the Intent

6. Please help ..Android and Beagleboard REV C Issues

7. cara ganti ringtone u/ SMS di Magic