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

Untitled

By: a guest on Jul 18th, 2012  |  syntax: None  |  size: 0.99 KB  |  hits: 6  |  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. How to programatically change a TextView to an ImageView and back
  2. <LinearLayout
  3.     android:layout_width="320dp"
  4.     android:layout_height="50dp" >
  5.  
  6.     <TextView
  7.         android:id="@+id/textView2"
  8.         android:layout_width="wrap_content"
  9.         android:layout_height="wrap_content"
  10.         android:layout_weight="0.35"
  11.         android:text="      "
  12.         android:textAppearance="?android:attr/textAppearanceLarge" />
  13.     </LinearLayout>
  14.        
  15. <LinearLayout
  16.     android:layout_width="320dp"
  17.     android:layout_height="50dp" >
  18.  
  19.     <TextView
  20.         android:id="@+id/textView2"
  21.         android:layout_width="wrap_content"
  22.         android:layout_height="wrap_content"
  23.         android:layout_weight="0.35"
  24.         android:text="      "
  25.         android:textAppearance="?android:attr/textAppearanceLarge" />
  26.  
  27.     <ImageView
  28.         android:id="@+id/image_view_1"
  29.         android:visibility="gone"
  30.         android:layout_width="wrap_content"
  31.         android:layout_height="wrap_content" />
  32.  
  33. </LinearLayout>