这是我的ListvIEw代码:
<ListVIEw androID:ID="@+ID/ListVIEwdoctorwithappointment" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_marginleft="7dp" androID:layout_marginRight="7dp" androID:layout_margintop="10dp" androID:minHeight="80dp" androID:background="@drawable/customshapeduplicate" androID:cachecolorHint="@androID:color/transparent" androID:divIDer="#4F94CD" androID:divIDerHeight="10dp" androID:smoothScrollbar="true" androID:ListSelector="@drawable/selector" androID:scrollbars="none" ></ListVIEw>
这是我的customshapeduplicatefile是这样的:
<shape xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:shape="rectangle"> <gradIEnt androID:startcolor="#ffffff" androID:endcolor="#ffffff" androID:angle="270"/> <corners androID:bottomrighTradius="10dp" androID:bottomLefTradius="10dp" androID:topLefTradius="10dp" androID:topRighTradius="10dp"/> </shape>
这是图像:
解决方法 设置背景不是列表视图,而是用于显示列表视图行的自定义布局androID:background="@drawable/customshapeduplicate"总结
以上是内存溢出为你收集整理的android – 带圆角的Listview项目全部内容,希望文章能够帮你解决android – 带圆角的Listview项目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)