Android 如何在线条底部添加不同的颜色

Android 如何在线条底部添加不同的颜色,android,view,colors,line,Android,View,Colors,Line,我想创建这样的应用程序: 然后如何在行尾添加不同的颜色。 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="match_p

我想创建这样的应用程序: 然后如何在行尾添加不同的颜色。


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="6dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_marginBottom="50dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp" >

        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#111293" />

        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#571293" />

        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#571200" />

        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#579993" />

    </LinearLayout>

</RelativeLayout>
这可能会对您有所帮助

<RelativeLayout 
     android:layout_width="fill_parent"
android:layout_height="fill_parent"
    >
<LinearLayout 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
     android:layout_alignParentBottom="true"
    android:layout_marginLeft="20dp"
    android:layout_marginRight="20dp"
    android:layout_marginBottom="50dp"
    android:orientation="horizontal">
    <TextView 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#8D0D0D"
        />
    <TextView
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#0D8D6F"
        />
    <TextView
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#388D0D"
        />
    <TextView 
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#54dfac"
        />
</LinearLayout>


简单制作图像并放置图像视图,但我使用的是相对布局视图。您可以在底部的相对布局中添加linearLayout。效果很好,谢谢。还有一个问题,请查看下面对齐的4.2文本视图如何创建它。但它将对齐右下角我想要右下角的textview和Riod Ui设计工具包PSD