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. RC33 for Dev Phone

Hello, can someone help me understand how I can get the latest RC33
release for the dev phone?
--~--~---------~--~----~------------~-------~--~----~

2. Changing foreground or background color of title text of a Dialog

I have a subclass of android.app.Dialog and because I am using a light
theme, the dialog title comes out as Black on a dark background which
is hardly readable.
This leads me to the question: how do I change the Dialog title
background or foreground colors? Can I do this via a theme? Which
property will it map to?

Here is how I define my theme:
  <style name="MyTheme" parent="android:Theme.Light">
    <item name="android:windowBackground">#f3efe1</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:textColor">@drawable/solid_black</item>
 </style>

If theme is not possible, can I do this programmatically?

Thanks
Inder

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

3. If rc33 can be dl to my g1 why not elements of cupcake?

4. Application storage data growing

5. "Stuck" SMS message

6. Share database between applications

7. Display RGB Buffer