安卓:ExpandableListView绘制组的指标是大的用我自己的图标,当我 [英] Android: ExpandableListView drawable group indicator being big when i using my own icon

查看:138
本文介绍了安卓:ExpandableListView绘制组的指标是大的用我自己的图标,当我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用这codeS设置自己的组指示器图标并将其设置为右侧列表

I am using this codes to set my own group indicator icon and set it to right side of the list

ExpandableListView list = (ExpandableListView) findViewById(R.id.SCHEDULE);

Drawable icon = StationInfo2.this.getResources().getDrawable(R.drawable.expander_group);

list.setGroupIndicator(icon);

list.setIndicatorBounds(list.getWidth() - 80, list.getWidth() - 40);

其作品展现我自己的图标,但在尺寸不合适的图标显示。

Its works to show my own icon but the icon shows in wrong size.

Becouse我是新来的,我不能发布链接或图片来说明如何它的外观一样,但我希望某人有一个好主意,我该怎么办?

Becouse i am new here i can not post links or image to show how its looks like but i hope someone has a good idea how i can do?

推荐答案

您应该使用9补丁绘制。 http://developer.android.com/tool​​s/help/draw9patch.html 把黑色象素到拐角。这将有助于。 (如果你需要更多信息请联系我)。 看origingal一个你看到黑点?让他们为你的形象。

You should draw it using 9-patch. http://developer.android.com/tools/help/draw9patch.html Put black pixel to the corners. that will help. (contact me if you need more info). Look at the origingal one you see black dots? make them for your image.

这篇关于安卓:ExpandableListView绘制组的指标是大的用我自己的图标,当我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆