ListView not touchable in my Activity

by monn3t » Fri, 10 Apr 2009 01:37:10 GMT


Sponsored Links
 Hello:

I developed an activity that extends the ListActivity.
It has a ListView that binds to a DB.

Thing is that I can click on the items of the view only with the
trackball.  When I try touching the items or the view I can't, is not
responsive.

Below the view I have a button that works just fine in touch screen
mode.

I already tried removing the button (I thought that was it) but no.

Any thoughts?

Thanks in advance.

Here is a snippet of my code:

public class Activity_CardList extends ListActivity {

        private DbAdapter myDbAdapter;
        private DbHelper myDbHelper;
        private Cursor HolderCursor;
        private String[] from;
        private int[] to;
        private static final int ADDCARD_DIALOG = 1;
        private static final int ABOUT_DIALOG = 2;

        static String barcodeNumber = "";
        static String cardNote = "";
        static String retailerName = "";
        static String cardIcon = "";

        // private ImageView storeLogo;
        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.card_list);

                myDbAdapter = new DbAdapter(this);
                myDbAdapter.open();
                HolderCursor = myDbAdapter.getAllEntries();
                from = new String[] { myDbHelper.FIELD1, myDbHelper.FIELD2,
                                myDbHelper.FIELD3 };

                to = new int[] { R.id.icon_iv, R.id.field1,
                                R.id.field2};

                SimpleCursorAdapter notes = new SimpleCursorAdapter(this,
R.layout.row,
                                HolderCursor, from, to);

                setListAdapter(notes);

                this.getListView().setChoiceMode(1);
                this.getListView().setSelectionFromTop(1, 1);

                Button addCard = (Button) this.findViewById
(R.id.cardlist_addCard_btn);
                addCard.setOnClickListener(new Button.OnClickListener() {
                        public void onClick(View v) {
                                showDialog(ADDCARD_DIALOG);
                        }
                });
        }

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



ListView not touchable in my Activity

by Chander Pechetty » Fri, 10 Apr 2009 11:24:46 GMT


 I don't see any itemClickListener registered ?

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


Sponsored Links


Other Threads

1. Strange crashing while using OpenGL

Hello,

I am currently developing an application that uses OpenGL with the
Android 1.6 SDK.
I am testing on both a Nexus One and an I/O Device (Magic).

The application runs perfectly on the Nexus.

On the Magic, the application crashes >50% of the time on the first
frame with a segmentation fault (see end of post). If it does not
crash immediately, it runs fine and exits normally.

The crash occurs when calling glDrawArrays for one of my vertex buffer
objects.
Oddly, when I enable lighting and one light, the application no longer
crashes. Unfortunately this is not a solution because the application
runs too slowly with lighting.

I have found reports of crashing with vertex buffer objects when using
non-direct buffers, but I am using direct buffers.

For debugging, I modified my code to Log each gl call before it was
made. Everything looks fine to me but maybe I'm doing something wrong:
http://p5ui5jjnxq.pastebin.com/m2e2c1754

Does anyone have any idea what could be causing the segmentation
fault?
Any ideas why lighting would affect it, or why everything is fine on
the Nexus?
Is there something in addition to using direct buffers that needs to
be done when using vertex buffer objects?

Thanks

-----------------------------------------------------------------------------------------------------------------------------------------------------------
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google_ion/google_ion/sapphire/sapphire:1.6/
DRC83/14721:user/test-keys'
pid: 536, tid: 553
signal 11 (SIGSEGV), fault addr 001fa000
 r0 001b51b8  r1 001f9ff8  r2 00000003  r3 001b9e70
 r4 001f9ffc  r5 001b9e74  r6 00000014  r7 000003ff
 r8 00000000  r9 001b9e58  10 00000003  fp 001b51a4
 ip 00000002  sp 44847d08  lr 8042b8dc  pc 8043fdd8  cpsr 20000010
         #00  pc 0003fdd8  /system/lib/libhgl.so
         #01  lr 8042b8dc  /system/lib/libhgl.so
stack:
    44847cc8  001af0e0  [heap]
    44847ccc  001177e0  [heap]
    44847cd0  4210aecc
    44847cd4  8043bac0  /system/lib/libhgl.so
    44847cd8  001af0e0  [heap]
    44847cdc  00000000
    44847ce0  001b00e0  [heap]
    44847ce4  804251a0  /system/lib/libhgl.so
    44847ce8  001177e0  [heap]
    44847cec  00984300
    44847cf0  001b5198  [heap]
    44847cf4  001af0e0  [heap]
    44847cf8  001afbdc  [heap]
    44847cfc  00000005
    44847d00  df002777
    44847d04  e3a070ad
#00 44847d08  00000400
    44847d0c  001177e0  [heap]
    44847d10  00989300
    44847d14  001b5198  [heap]
    44847d18  001af0e0  [heap]
    44847d1c  001afbdc  [heap]
    44847d20  00000000
    44847d24  00001000
    44847d28  00000008
    44847d2c  00000000
    44847d30  00000000
    44847d34  001af0e0  [heap]
    44847d38  001b00e0  [heap]
    44847d3c  001177e0  [heap]
    44847d40  4210aecc
    44847d44  4210aeb8
    44847d48  000003c0
    44847d4c  8041f79c  /system/lib/libhgl.so
-----------------------------------------------------------------------------------------------------------------------------------------------------------

2. Forward locking or copy protection outside the Marketplace

Take a look at andappstore.com... I know they provide some things for
developers to do this kind of thing.  At the very least they give devs some
tips to implement it in their own apps...




Hi, here's a scenario I've been asked to look in to: if you wish to
sell Android apps from your own website (which may already be
configured to sell apps and content for most other handset platforms),
what options are available to limit users from simply copying paid
content off their handsets and making it available for other users
free of charge?  Does Android support OMA forward locking via the web
browser for example (as you might use for content delivered to other
platforms via the browser)?  Obviously talking about the larger
percentage of users here without jail broken or hacked phones.

With internet-centric apps you can do in-app stuff to identify the
user and therefore restrict access on an account basis, but this isn't
necessarily suitable for apps that do not have a need to go online.

Many thanks for any help...

--

3. HTC S740 Android Porting

4. View.getLocationInWindow() only returns Y (and sometimes not even X)

5. Thx to boss lesjaw

6. Emulator on Ubuntu problem running after first time starting emulator

7. Background from PreferenceActivity is not applied to sub-PreferenceScreen