我正在使用 WilliamChart 库来显示一些统计数据。问题是我无法使其可滚动。
我找到了下面的方法,但是没有用:
setHorizontalScrollBarEnabled(true)
有人知道怎么解决吗?
提前致谢
最佳答案
@pindleskin:我在使用 AndroidPLot Chart 时遇到了同样的问题。在您的 xml 中尝试这种方式。希望对你有帮助
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
>
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="230dp" >
<RelativeLayout
android:id="@+id/RLayout_chart_container"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="230dp" >
///// Add your Chart Here
</RelativeLayout>
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
关于android - 图表库中的水平滚动 - WilliamChart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31961728/