0

I am on ICS 4.1+ and I have the layout below inside a LinearLayout that makes up a table cell. But when I select the EditText id takes focus but does not allow any input.

 <RelativeLayout android:id="@+id/options_bar" android:layout_width="fill_parent" android:layout_height="110dip" >  <!-- android:layout_marginBottom="-150dip"  --> 
<EditText  android:layout_marginLeft="15dip" android:layout_centerVertical="true" android:id="@+id/msg" android:editable="true" android:background="#D8D8D8" android:textColor="#000000" android:text="Reply to the tweet" android:layout_height="90dip" android:layout_width="170dip"
    android:layout_alignParentLeft="true" android:layout_marginRight="30dip"/>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_toLeftOf="@id/msg"
    android:text="Confirm" android:id="@+id/confirm_btn"/>
<Button android:id="@+id/cancel_btn" android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:text="Cancel" android:layout_toLeftOf="@id/confirm_btn"/>

Barak
  • 16,318
  • 9
  • 52
  • 84
user1847544
  • 957
  • 2
  • 9
  • 17

2 Answers2

0

Have you called requestFocus() on EditText?

0

You say ListView in your question title but talk about a table in the body of your question... assuming you meant ListView, all you should need to do is change the ListView focus mode

lv = (ListView) v.findViewById(android.R.id.list);
lv.setItemsCanFocus(true);
Barak
  • 16,318
  • 9
  • 52
  • 84