巧设置ExpandableListView右边的箭头
来源:互联网 发布:首字母大写php 编辑:程序博客网 时间:2024/04/29 14:36
转载
1、更换ExpandableListView右边的箭头(小图标)的疑问
第一个方法: 网上许多说到在ExpandableListView的布局xml中的groupIndicator更换成@drawable/***,我试过,可行,代码如下:
首先在drawable的文件夹下建立自定义选择布局属性的xml文件:ex_smallimage.xml
然后在ExpandableListView的groupIndicator设为: android:groupIndicator="@drawable/ex_smallimage"
这样做了可行,但是有个问题,就是图标总是随group的大小而拉伸,不会缩放:
那么我调了xml的group代码之后,可以勉强达到自己要求的效果,但是这样的代码没有弹性,换张图片还得改布局。。。如果有知道如何设置图标的大小告诉我咯~呵呵。。
方法二:经过上面的尝试,我禁掉了groupIndicator属性,然后再在group的xml中加入ImageView,这样可以控制我的图片的缩放和位置的更改,代码:
android:groupIndicator="@null"这里非常重要,禁用系统自带的图标
再在group的xml中设置ImageView,这个简单,然后在适配器的getGroupView中加入图片变换的效果:
OK,搞定它:
转载自:http://hi.baidu.com/%C1%D6%B5t%B3%CE01/blog/item/5186f1f9d23c8e72024f5617.html
0 0
- 巧设置ExpandableListView右边的箭头
- 设置ExpandableListView右边的箭头
- 设置ExpandableListView右边的箭头
- 设置ExpandableListView右边的箭头
- 设置ExpandableListView右边的箭头
- 设置ExpandableListView右边的箭头
- 【Tech-Android-View】巧设置ExpandableListView右边的箭头
- ExpandableListView替换右边箭头的实现
- 设置ExpandableListView左边的箭头
- ExpandableListView箭头右边显示方法
- ExpandableListView 功能界面布局探究之一 ( 更换ExpandableListView右边的箭头(小图标))
- ExpandableListView 功能界面布局探究之一 ( 更换ExpandableListView右边的箭头(小图标))
- ExpandableListView的箭头问题
- 替换ExpandableListView右边箭头Group Indicator(小图标)
- ExpandableListView使用,点击条目请求网络数据,箭头在右边
- TextView右边箭头的显示
- 去掉ExpandableListView的箭头图标
- 去掉ExpandableListView的箭头图标
- 第二周 项目2-程序的多文件组织
- ThreadLocal
- 影响移动广告收入的秘密
- 申请iOS公司开发者账号
- 关于寻路算法的一些思考(9):寻路者的移动成本
- 巧设置ExpandableListView右边的箭头
- java 线程的基本用法
- 第3周 项目3-求集合并集
- 关于图像中的高低频成分与梯度及梯度方向的说明
- 第四周—项目3 - 单链表应用(1)逆置
- Android AndroidManifest 清单文件以及权限详解
- 获取数组中子串乘积的最大值
- Java之集合类应用总结
- 第4周、项目1—建立单链表