2011-02-09 5 views
1

J'ai un textview et un edittext dans un tablerow .. mon problème est quand j'essaye d'écrire beaucoup de caractères dans edittext alors je ne peux pas voir ce que j'écris .. il semble que le problème dans la largeur .. N'importe quelle façon de faire de la ligne multiligne ou du edittext scolling pendant que j'écris?edittext inside 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

Voulez-vous défiler à l'intérieur de edittext ,,, – Amsheer

Répondre

0

Avez-vous essayé avec android:lines/android:maxLines?

+0

si je mets android: lignes = « 2 » dans le edittext alors j'ai 2 lignes EditText du début ... si je mets android: maxLines dans le edittext puis rien ne se passe .. – Nikitas

+0

Qu'en est-il de android: inputType = "textMultiLine"? – Shade

0

Utilisez cette aide pour vous.

<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>