ListView几个比较特殊的属性

Android:stackFromBottom="true"      

设置该属性之后你做好的列表就会显示在列表的最下面,值为true和false

android:transcriptMode="alwaysScroll" 

要用ListView或者其它显示大量Items的控件实时跟踪或者查看信息,并且希望最新的条目可以自动滚动到可视范围内。通过设置的控件transcriptMode属性可以将Android平台的控件(支持ScrollBar)自动滑动到最底部。

cacheColorHint

很多人希望能够改变一下它的背景,使他能够符合整体的UI设计,改变背景背很简单只需要准备一张图片然后指定属性 android:background="@drawable/bg",不过当你这么做以后,发现背景是变了,但是当你拖动,或者点击list空白位置的时候发现ListItem都变成黑色的了,破坏了整体效果。
如果只是换背景的颜色的话,可以直接指定android:cacheColorHint为你所要的颜色,如果你是用图片做背景的话,那也只要将android:cacheColorHint指定为透明(#00000000)就可以了

android:divider="@drawable/list_driver" 

其中  @drawable/list_driver 是一个图片资源,如果不想显示分割线则只要设置为android:divider="@drawable/@null" 就可以了

android:scrollbars="none"

与setVerticalScrollBarEnabled(true);的效果是一样的,不活动的时候隐藏,活动的时候也隐藏

android:fadeScrollbars="true" 

配置ListView布局的时候,设置这个属性为true就可以实现滚动条的自动隐藏和显示。

android:fadingEdge

上边和下边有黑色的阴影 android:fadingEdge="none" 设置后没有阴影了

转载于:https://www.cnblogs.com/crystal022/archive/2012/10/23/2734989.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274557.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

超级玛丽马里奥版下载_将超级马里奥赋予生命

超级玛丽马里奥版下载Have you ever seen a zoetrope? If today’s sophisticated computer animation is the latest evolution of the form, then the remarkable zoetrope is a crucial ancestor; the transitional form between the drawing and the animation.等皆你见过…

如何在繁重的工作中持续成长?

大家好,我是若川。持续组织了近一年的源码共读活动,感兴趣的可以 加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

Mono for Android 对话框 倒计时

UI调度:public class Dispatcher : Handler { public override void HandleMessage(Message msg) { var ai msg.Obj as ActionItem; if (ai ! null) { try { …

熊kong作品资源链接_Kong雀技术:向世界展示您的设计作品

熊kong作品资源链接The door opened and I entered the bedroom of an apartment I was looking to rent. No furniture or items inside, it was almost empty except for a frame in the wall. It was a photo of a peacock. As I stared at it, I could not shake one clear…

漫谈前端工程化基建和架构设计 | 留言送书

大家好,我是若川。持续组织了近一年的源码共读活动,感兴趣的可以 加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。本文留言抽奖送书,具体规则看文末。透过工程基建,架构有迹可循。前…

oracle中 rownum与rowid的理

一、 Oracle分页查询 我们先看学习一下oracle分页查询的语法示例,然后在具体学习用rownum的原理。 /*从第1条开始,每次选N个,从第1M个开始每次选N个*/ /**/ select t2.* from (select rid from (select r.rid, rownum linenum from (select r…

设计模式 日志系统设计_模式:我们设计系统的故事

设计模式 日志系统设计Design Patterns are some of the most over-used concepts in design today. And we all know what happens when you have some ideas all over the place. We start repeating them like parrots and applying them to everything, therefore distorti…

前端好还是后端好,看看7年前端和后端怎么说

大家好,我是若川。持续组织了近一年的源码共读活动,感兴趣的可以 加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外…

提升UI技能的5个步骤

element ui 步骤重点 (Top highlight)What to do when you know how to use the software and know the basics of designing interfaces? There are a few simple things that you can do to take your skills to the next level, and you don’t need to invest in expensiv…

空降进阿里的 P10 都是什么人

周末见了几个朋友,吃饭时聊到他们前老板郭东白(阿白),对了,我朋友在速卖通,他说阿白是 14 年来的阿里,直接就空降进了他们部门,当上首席架构师,后来又升到了 CTO&#xf…

linux下练习 c++ 关联式容器multimap特性

/* multimap特性 key可以重复 不支持下标访问 */ #include<iostream> #include<string> #include "print.h" #include<map> using namespace std; typedef pair<int,string> pairmp; typedef multimap<string,double> MS;int main() …

一致性设计,而不是一致性

一致性设计重点 (Top highlight)If we ask any design system advocate what are the main reasons to build and maintain a design system, chances are ‘Consistency’ will come up as first or second in their list, together with the ‘A single source of truth’ po…

如何在 React 应用中使用 Hooks、Redux 等管理状态

大家好&#xff0c;我是若川。持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系…

长语音识别体验_如何为语音体验写作

长语音识别体验重点 (Top highlight)“Voice User Interface (VUI) Designer” is an increasingly prominent job title in the tech world. A VUI designer typically writes the conversation and designs the flow between a VUI — an invisible interface that communica…

表连接

初学SQL表连接的时候&#xff0c;什么笛卡尔积&#xff0c;左连接&#xff0c;右连接看的头都大了 后来看了《SQL Server技术内幕2008&#xff1a;T-SQL查询》之后&#xff0c;豁然开朗。今天写数据库又用到了表连接&#xff0c;印象有点模糊了&#xff0c;赶紧找地方写下来先。…

分析了1011个程序员的裁员情况后得出的启示

大家好&#xff0c;我是若川。持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系…

定义设计系统

System is “the whole creation, the universe,” from Late Latin systema “an arrangement, system,” from Greek systema “organized whole, a whole compounded of parts”.系统是晚期拉丁语系统的“整体创造物&#xff0c;宇宙”&#xff0c;是希腊语系统的“一种安排…

如何备份linux系统(转)

如何备份linux系统 不像Windows&#xff0c;Linux不限制根用户存取任何东西&#xff0c;因此&#xff0c;你完全可以把一个分区上每一个的文件放入一个TAR文件中。来实施这一方法&#xff0c;用这个成为根用户&#xff1a;sudo su接着去你的文件系统的根目录&#xff08;在我们…

2w行代码、200个实战项目,助你修炼5大编程基本功。【送书《设计模式之美》】...

大家好&#xff0c;我是若川。之前送了很多书&#xff0c;现在又和异步图书合作再次争取了几本书&#xff0c;具体送书规则看文末。所谓练武不练功&#xff0c;到老一场空&#xff0c;以技术为驱动的程序员同样如此。面向对象编程范式、设计原则、代码规范、重构技巧和设计模式…

C++第10周项目2扩展之2参考——迭代求和

课程首页地址&#xff1a;http://blog.csdn.net/sxhelijian/article/details/7910565【项目2扩展之2&#xff08;选做&#xff09;】计算下面的式子&#xff0c;不能使用求幂函数pow()式一&#xff1a;#include <iostream> using namespace std; int main( ) { int i,m1;…