Hi all,
How can I select a tablerow in tablelayout when this tablelayout is
fill with database data ? Myy code is:
But I can't select any row, why?
Cursor c = db.allCategory();

                for (c.moveToFirst(); c.moveToNext(); c.isAfterLast())
                {
                        TableRow row = new TableRow(this);
                        TextView tvName = new TextView(this);
                        TextView tvValue = new TextView(this);
                        tvValue.setGravity(Gravity.RIGHT);

                        tvName.setText(c.getString(1));
                        tvValue.setText("R$ 10.00");
                        row.addView(tvName, 0);
                        row.addView(tvValue, 1);

                        tblExpenses.addView(row);

                        //I tried the code below
                        row.setFocusable(true);
                        row.setFocusableInTouchMode(true);
                        tvName.setFocusable(true);
                        tvName.setFocusableInTouchMode(true);
                        tvValue.setFocusable(true);
                        tvValue.setFocusableInTouchMode(true);
                        tblExpenses.setFocusable(true);
                        tblExpenses.setFocusableInTouchMode(true);

                }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to