これはに表示するための私のXMLですuser's information
。ListView
したがって、現在、TextView
ユーザーの情報を表示している2つのXMLが含まれています。
問題文:-
アプリケーションを実行するときはいつでも、両方がText View
並んでいるのが見えます。たとえば、私はいつも以下のようなものを手に入れます-
SomeImage TextView1 TextView2
それは私が望まないものです。私はこのようなものが必要です-そして私が将来3つのTextViewを持っていると仮定します。
SomeImage TextView1
TextView2
TextView3
以下は、現在使用しているXMLファイルです。必要な出力を常に取得できるように、これを変更するにはどうすればよいですか?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/image"
android:layout_width="50dip"
android:layout_height="50dip"
android:scaleType="centerCrop"
android:src="@drawable/stub" />
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="10dip"
android:layout_weight="1"
android:textSize="10dip" />
<TextView
android:id="@+id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="10dip"
android:layout_weight="1"
android:textSize="10dip" />
</LinearLayout>