dear friends,
i am facing issue that when i click on edittext its width gets changed i want to fix its width according to screen so that it covers whole screen and then button at right side of it.
here is the code
dear friends,
i am facing issue that when i click on edittext its width gets changed i want to fix its width according to screen so that it covers whole screen and then button at right side of it.
here is the code
Hi,
You are missing android:layout_width="fill_parent" on the TableRow and EditText tags. Should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:stretchColumns="2" android:orientation="horizontal">
<TableRow android:layout_width="fill_parent">
<EditText android:id="@+id/txtAdPost" android:layout_column="2"
android:gravity="left" android:singleLine="True"
android:layout_width="fill_parent" />
<Button android:id="@+id/btnAdPost" android:gravity="left"
android:layout_height="45px" android:layout_column="3" android:text="New Post" />
</TableRow>
</TableLayout>
actually i was using RelativeLayout above
table which was causing problem
removing that solved my problem.