android - How to fill tableRow with editText in all row -
i have table layout rows. 1 row description next 1 edittext values. how can force edittext fill table row? thought did android:layout_weight="1" when type edittext grow side , crush layout. when i´m not reaching max lenght of word can put edittext.
here code:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".mainactivity"> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/innerrelativelayout"> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchcolumns="1" android:id="@+id/table"> <tablerow android:id="@+id/name"> <textview android:layout_column="1" android:text="název" android:padding="3dip" /> </tablerow> <view android:layout_width="fill_parent" android:layout_height="1dp" android:background="@android:color/darker_gray"/> <tablerow android:id="@+id/nameedit"> <edittext android:id="@+id/tariffname" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="start" android:inputtype="text" android:layout_weight="1" android:layout_marginleft="15dp" android:background="@drawable/edittext"/> </tablerow>
edit: screen added
before input
after input
well, solved myself. used android:layout_span="3" insted of android:layout_weight="1".
Comments
Post a Comment