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. Which platform manifest for android-2.6.37-rc7?

Hi,
      Which android platform manifest can I use with the
android-2.6.37-rc7 experiemental kernel?

git://android.git.kernel.org/kernel/experimental.git android-2.6.37-
kernel-patchwork

branch origin/sandbox/dima/android-2.6.37

I've built the android-2.6.37-rc7 kernel already, but android-2.2
platform manifest crashes at the init process.

Elvis Dowson

-- 

2. Custom bootanimation

Hi, I can't change default boot animation.
I added a new png file to "mydroid\frameworks\base\core\res\assets
\images" and changed path to my own png in BootAnimation.cpp. But I
see only first ANDROID_ animation then black screen and then Android
Home screen.
Can anyone help me?

-- 

3. New Android Market Client Update

4. New Application - advice on how to get started?

5. Instructions to "manually" install an SDK

6. Is there a standard for updating a system ?

7. Signing 2 application with same certificate