关于GridView里面的一个padding
来源:互联网 发布:linux远程拷贝文件夹 编辑:程序博客网 时间:2024/05/21 06:33
今天在干活的时候,发现gridview里面的内容偏左。用hierarchyviewer发现有个paddingRight,但是怎么也找不到在哪里设置的。
后来发现是因为右侧有个scrollbar,导致会加padding。
下边一段摘自sdk文档,已经说的很明白了,因此改成overlay就好了。
android:scrollbarStyle
Controls the scrollbar style and position. The scrollbars can be overlaid or inset.When inset, they add to the padding of the view. And the scrollbars can be drawn inside the padding area or on the edge of the view. For example, if a view has a background drawable and you want to draw the scrollbars inside the padding specified by the drawable, you can use insideOverlay or insideInset. If you want them to appear at the edge of the view, ignoring the padding, then you can use outsideOverlay or outsideInset.
Must be one of the following constant values.
insideOverlay
0x0Inside the padding and overlaidinsideInset
0x01000000Inside the padding and insetoutsideOverlay
0x02000000Edge of the view and overlaidoutsideInset
0x03000000Edge of the view and insetThis corresponds to the global attribute resource symbol scrollbarStyle
.
Related methods:
- setScrollBarStyle(int)
- 关于GridView里面的一个padding
- tensorflow里面的padding解释
- 关于padding的文章
- 关于gridView里面点击后图片变小的原因
- 关于listview,gridview里面数据显示不全的问题
- 关于padding的小细节
- 关于.9图的padding
- 关于padding的一些用法
- 关于ScrollView里面嵌套ListView和GridView
- 盒子模型里面的margin属性和padding属性杂记
- asp.net(C#)通过点击一个checkbox,gridview里面的checkbox全部选中
- listview,gridview里面通过一个item控制所有item的使用方法
- 关于如何反编译一个apk里面的xml的
- 关于android service生命周期里面值得注意的一个问题
- 关于《U-Boot 移植手册》里面的一个小问题
- 关于一个页面里面有两个按钮的解决。
- 关于编程之美一个房间里面三盏灯的问题
- 关于一个controller里面几个全屏view切换的问题
- 高级工程师对PCB设计中的几点建议,收藏!
- Remove Duplicates from Sorted Array基本处理方法和集中优质解法解析
- IOS 清除APP缓存文件
- 统计list中重复数据的条数
- MyBatis传入多个参数的问题的解决方法
- 关于GridView里面的一个padding
- RippleDrawable--点击效果
- Centos7中java环境变量的配置
- Oracle汉字转化英文
- Android控件分类整理
- Java语言有哪些优点?
- pgsql在linux导入导出数据
- 设计模式系列之六:代理模式
- HTTP 缓存机制