扩展列表视图中移动组图标指示向右软糖4.3版本? [英] Expandable list view move group icon indicator to right in jellyBean 4.3 version?

查看:120
本文介绍了扩展列表视图中移动组图标指示向右软糖4.3版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的方法是不工作在Android版本4.3软糖

The below method is not working in android version jellybean 4.3.

historyExpaLV.setIndicatorBounds(historyExpaLV.getRight() - 60,
                    historyExpaLV.getWidth() - 8);    

有谁知道解决的办法?先谢谢了。

Does anyone know the solution? Thanks in advance.

推荐答案

我该如何解决了这个问题:

How I fixed this:

更新SDK管理器到Android 4.3,并把它作为构建目标。他们推出的API 18日,被称为一个新的方法 setIndicatorBoundsRelative(INT,INT),这在安卓4.3可以作为其他的(但正确)。

Update SDK Manager to Android 4.3 and use it as build target. They introduced a new method in the API 18, called setIndicatorBoundsRelative(int, int), which works as the other (but correctly) in android 4.3.

请了Android版本的检查,并使用旧方法与旧的API:

Make a check for Android version and use the old method with older API:

if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
   mListView.setIndicatorBounds(myLeft, myRight);
} else {
   mListView.setIndicatorBoundsRelative(myLeft, myRight);
}

这篇关于扩展列表视图中移动组图标指示向右软糖4.3版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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