私はリストアイテムで2つのテキストビューを使用して、アンドロイドアプリケーションのリストビューで使用しています。リストアイテム内で水平に2つのテキストビューを整列する
ただし、テキストビューは各リストアイテムの下に表示され、各アイテムに水平に表示したいと考えています。リニアレイアウトを使用するのは役に立ちますか?または、相対レイアウトを使用してそれを行うことは可能ですか?
android:layout_alignRight = "@ + id/lnumber" 2番目のテキストビューでこれを使用すると、テキストアイテムがリストアイテムの左端に垂直に印刷されました。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin">
<TextView
android:id="@+id/lnumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dip"
android:paddingTop="6dip"
android:textColor="#5d5d5d"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/lname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dip"
android:textColor="#5d5d5d"
/>
</RelativeLayout>