布局像机器人卡 [英] Layout like Cards in android

查看:96
本文介绍了布局像机器人卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要像谷歌卡一个Android的布局,我知道有一个开放源码库,但我想要的只是布局和灰色六角背景风格。我找不到这方面的信息,我怎么可以让这一切成为可能? IM附加新的谷歌地图V7布局,使你可以得到的想法。

I want to make an android layout like Google Cards,i know there is an Open Source Libraries, however i want only the Layout and the gray hex background style. I could not find information about this, how i can make this possible? im Attaching new Google maps v7 Layout so you can get the idea.

推荐答案

bg_c​​ard.xml

bg_card.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="#CCC" />
            </shape>
    </item>
    <item android:bottom="2dp">
        <shape android:shape="rectangle">
            <solid android:color="#FFF" />
        </shape>
    </item>
</layer-list>

或者只设置卡的背景#FFF并添加底部:

Or just set the background of the card to #FFF and add at the bottom:

<View
    android:layout_width="match_parent"
    android:layout_height="2dp"
    android:background="#CCC" />

这篇关于布局像机器人卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆