2011-02-09 2 views
1

У меня есть текстовое представление и текст внутри таблички. моя проблема в том, что я пытаюсь написать много символов в edittext, тогда я не могу видеть, что я пишу .. Кажется, проблема в ширине. Любой способ сделать многострочный ряд или scolling edittext, пока я пишу?edittext внутри tablerow android

<TableLayout 
    android:id="@+id/table" 
    android:layout_height="wrap_content" 
    android:layout_width="fill_parent" 
    android:paddingTop="30dip" 
    android:paddingLeft="10dip" 
    android:paddingRight="10dip" 
    android:layout_below="@id/banner" > 
    <TableRow> 
     <TextView 
      android:id="@+id/username_label" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="#fff" 
      android:textSize="18dip" 
      android:text="Username" 
      /> 
     <EditText 
      android:id="@+id/entry1" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" /> 
    </TableRow> 

    <TableRow> 
     <TextView 
      android:id="@+id/password_label" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:textColor="#fff" 
      android:textSize="18dip" 
      android:text="Password" /> 
     <EditText 
      android:id="@+id/entry2" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:password="true" /> 
    </TableRow>  
</TableLayout> 
+0

Вы хотите прокручивать внутри EditText ,,, – Amsheer

ответ

0

Вы пробовали с android:lines/android:maxLines?

+0

если я установить андроид: строки = «2» в EditText тогда у меня есть две линии EditText от начала ... если я установить андроид: MaxLines в edittext тогда ничего не происходит. – Nikitas

+0

Как насчет android: inputType = "textMultiLine"? – Shade

0

Используйте эту помощь для вас.

<TableLayout android:id="@+id/table" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" android:stretchColumns="1" 
    android:layout_below="@+id/banner"> 
    <TableRow> 
     <TextView android:id="@+id/username_label" 
      android:layout_width="wrap_content"  android:layout_height="wrap_content" 
      android:textColor="#fff" android:textSize="18dip" android:text="Username" /> 
     <EditText android:id="@+id/entry1" android:layout_width="fill_parent" 
      android:layout_height="wrap_content" /> 
    </TableRow> 

    <TableRow> 
     <TextView android:id="@+id/password_label" 
      android:layout_width="fill_parent" android:layout_height="wrap_content" 
      android:textColor="#fff" android:textSize="18dip" android:text="Password" /> 
     <EditText android:id="@+id/entry2" android:layout_width="fill_parent" 
      android:layout_height="wrap_content" android:password="true" /> 
    </TableRow> 
</TableLayout> 
Смежные вопросы