Android 以特定格式显示记录

Android 以特定格式显示记录,android,Android,朋友我有一个列表视图。我需要以这种特殊的方式显示 14 May 2012 15:34 Arrival X 16 May 2012 20:00 Departure X 24 Aug 2012 20:00 Arrival X 请建议我对相同的代码进行更改。也可以在这里找到附加的xml代码 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://sche

朋友我有一个列表视图。我需要以这种特殊的方式显示

14 May 2012 15:34   Arrival     X
16 May 2012 20:00   Departure   X
24 Aug 2012 20:00   Arrival     X
请建议我对相同的代码进行更改。也可以在这里找到附加的xml代码

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_toLeftOf="@+id/imageView1"
        android:orientation="vertical"
        android:paddingLeft="10dp" >

        <TextView
            android:id="@+id/title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="Title"
            android:textColor="#000000"
            android:textSize="16sp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/detail"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="Detail"
            android:textColor="#000000" />

        <TextView
            android:id="@+id/data"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="Data"
            android:textColor="#000000" />
    </LinearLayout>

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_alignParentRight="true"
        android:background="@drawable/error"
        android:scaleType="centerCrop" />

</RelativeLayout>

我试着在一个特定的文本视图上设置它,但是对齐方式不同,当我在不同的设备之间检查它时,应用程序看起来很奇怪。


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_toLeftOf="@+id/imageView1"
    android:paddingLeft="10dp" android:orientation="horizontal">

    <TextView
        android:id="@+id/title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Title"
        android:textSize="16sp"
        android:textStyle="bold" android:textColor="#ffffffff" android:layout_weight="1"/>

    <TextView
        android:id="@+id/detail"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Detail" android:textColor="#ffffffff" android:layout_weight="1" />

    <TextView
        android:id="@+id/data"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Data" android:textColor="#ffffffff" android:layout_weight="1" />
</LinearLayout>

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="70dp"
    android:layout_height="70dp"
    android:layout_alignParentRight="true"
    android:background="@drawable/icon"
    android:scaleType="centerCrop" />

</RelativeLayout>

每一行都不同。正确的???(2012年5月14日15:34到达X)--第1行(2012年5月16日20:00离开X)--第2行请尝试下面给出的xml,并回复任何用于更好对齐的解决方案?它对于大屏幕设备工作正常,但对于小尺寸的设备则失败。。就像我所尝试的:(在模拟器中可用的最小配置上使用这个,它工作得很好。