ID が であるTextView
ボックス50px x 320pxを定義する XML レイアウトがありますTextView2
。同じ領域
を使用して画像を表示したい場合があります。プログラムでその領域をまたは
のいずれかに切り替えることができるようにしたいと考えています。TextView
TextView
ImageView
<LinearLayout
android:layout_width="320dp"
android:layout_height="50dp" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.35"
android:text=" "
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>