关闭

android-list底部按钮

97人阅读 评论(0) 收藏 举报
分类:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    android:orientation="horizontal" >

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:background="@drawable/shap_btn_without_left" >

        <TextView
            style="@style/ItemBottomButtonViewStyle"
            android:drawableLeft="@drawable/list_icon_resource"
            android:text="匹配货源" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:background="@drawable/shap_btn_with_top_bottom" >

        <TextView
            style="@style/ItemBottomButtonViewStyle"
            android:drawableLeft="@drawable/list_icon_update"
            android:text="重发" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:background="@drawable/shap_btn_without_right" >

        <TextView
            style="@style/ItemBottomButtonViewStyle"
            android:drawableLeft="@drawable/list_icon_delete"
            android:text="删除" />
    </LinearLayout>

</LinearLayout>
    <style name="ItemBottomButtonViewStyle" >
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">40dp</item>
        <item name="android:textColor">@color/orange_text</item>
        <item name="android:textSize">@dimen/textSize_12</item>
        <item name="android:gravity">center</item>
    </style>

shap_btn_without_left

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <shape>
            <solid android:color="#fafafa" />

            <stroke
                android:width="0.5dp"
                android:color="#d6d6d6" />
        </shape>
    </item>
    <item
        android:bottom="1dp"
        android:right="1dp"
        android:top="1dp">
        <shape>
            <solid android:color="#fafafa" />
        </shape>
    </item>

</layer-list>

shap_btn_with_top_bottom

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <shape>
            <solid android:color="#fafafa" />

            <stroke
                android:width="0.5dp"
                android:color="#d6d6d6" /> 
        </shape>
    </item>
    <item
        android:bottom="1dp"
        android:top="1dp">
        <shape>
            <solid android:color="#fafafa" />
        </shape>
    </item>

</layer-list>

shap_btn_without_right

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <shape>
            <solid android:color="#fafafa" />

            <stroke
                android:width="0.5dp"
                android:color="#d6d6d6" />
        </shape>
    </item>
    <item
        android:bottom="1dp"
        android:left="1dp"
        android:top="1dp">
        <shape>
            <solid android:color="#fafafa" />
        </shape>
    </item>

</layer-list>
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:248次
    • 积分:14
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:1篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档