Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 1.68 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Long text in TextView
  2. <TableLayout
  3.     android:layout_width="fill_parent"
  4.     android:layout_height="0dip"
  5.     android:layout_weight="1" >
  6.  
  7.     <TableRow
  8.         android:id="@+id/tableRow1"
  9.         android:layout_width="fill_parent"
  10.         android:layout_height="wrap_content" >
  11.  
  12.         <TextView
  13.             android:layout_width="fill_parent"
  14.             android:layout_height="wrap_content"
  15.             android:padding="5dip"
  16.             android:text="@string/text" />
  17.  
  18.         <TextView
  19.             android:id="@+id/gender"
  20.             android:layout_width="fill_parent"
  21.             android:layout_height="wrap_content"
  22.             android:gravity="right"
  23.             android:text="@string/lorem" />
  24.     </TableRow>
  25. </TableLayout>
  26.        
  27. <TableLayout
  28.         android:layout_width="fill_parent"
  29.         android:layout_height="100dip"
  30.         android:layout_weight="1" >
  31.  
  32.         <TableRow
  33.             android:id="@+id/tableRow1"
  34.             android:layout_width="fill_parent"
  35.             android:layout_height="wrap_content" >
  36.  
  37.             <TextView
  38.                 android:layout_width="wrap_content"
  39.                 android:layout_height="wrap_content"
  40.                 android:layout_weight="0.5"
  41.                 android:padding="5dip"
  42.                 android:text="@string/text" />
  43.  
  44.             <TextView
  45.                 android:id="@+id/gender"
  46.                 android:layout_width="wrap_content"
  47.                 android:layout_height="wrap_content"
  48.                 android:layout_weight="0.5"
  49.                 android:gravity="right"
  50.                 android:text="@string/lorem" />
  51.         </TableRow>
  52.     </TableLayout>
  53.        
  54. android:singleLine="false"
  55.        
  56. android:lines="2"
  57.        
  58. android:scrollHorizontally="true"