Android如何使GridView项目转角 [英] android how to make gridview item corner round

查看:81
本文介绍了Android如何使GridView项目转角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将添加图片以显示它. https://drive.google.com/file/d/0B -dRDlHZAgYbVG5Ca1l2MTZseHc/edit?usp = sharing 您可以在图像中看到细节.

I will add a image to show it. https://drive.google.com/file/d/0B-dRDlHZAgYbVG5Ca1l2MTZseHc/edit?usp=sharing you can see the detail in the image.

推荐答案

对于每个网格项目,请使用以下背景:-
(将以下代码保存在drawable文件夹中)

For each grid item use the background below :-
(save the below code in drawable folder)

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:bottom="1dp" android:left="1dp" android:right="1dp" android:top="1dp">
         <shape android:shape="rectangle">
         <solid android:color="@color/black_transparent"/>
         <corners android:bottomRightRadius="12dp" android:bottomLeftRadius="12dp"    android:topLeftRadius="12dp" android:topRightRadius="12dp"/>
         </shape>
    </item>
</layer-list>

这篇关于Android如何使GridView项目转角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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