简体   繁体   English

如何创建看起来像其TextViews比它大的列表项?

[英]How to create list item that looks like its TextViews are bigger than it?

I have a listview and need to create listitem that has labels (star and 15 min) that slightly stand out of list item- looks like they are bigger. 我有一个listview,需要创建带有标签(星号和15分钟)的listitem,该标签略微超出列表项-看起来它们更大。

在此处输入图片说明

What kind of background must i make for listitem layout? 我必须为列表项布局设置什么样的背景?

使用9patch图像使背景的顶部具有几个透明像素,不需要XML形状(除非在那里绘制背景),只需使用PNG文件就可以了。

只需为您的列表视图创建一个自定义列表视图适配器

创建一个关于8dp透明的Background Shape xml,然后使用该xml作为您的listview背景

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM