Android: Rounded Corners TextView XML Layout with custom Header

自作多情 提交于 2019-12-06 01:37:02

if you not using image for that then require three xml in drawable and create this type of layout : 1 linearlayout_background.xml

<?xml version="1.0" encoding="utf-8"?>

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

        <corners android:radius="2dp" />
    </shape>
</item>
<item
    android:bottom="2dp"
    android:left="0dp"
    android:right="0dp"
    android:top="0dp">
    <shape android:shape="rectangle" >
        <solid android:color="@android:color/white" />

        <corners android:radius="2dp" />
    </shape>
</item>

  1. header_background :

        <corners android:topLeftRadius="5dp" android:topRightRadius="5dp" />
    
        <solid android:color="@color/off_black1" />
    </shape></item>
    

  1. buttonbackground

        <corners android:radius="5dp" />
    
        <solid android:color="#00000000" />
    
        <stroke android:width="1dp" android:color="@color/off_white2" />
    </shape></item>
    

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!