【发布时间】:2012-07-23 17:48:44
【问题描述】:
我正在尝试在滚动视图中创建一个 achartengine 图表,但它不会显示!它只是显示黑屏,但不会崩溃或任何东西。问题是如果我只是将我的标签更改为图表显示就好了。在我的 Java 代码中,我确实有 renderer.setInScroll(true);用于图表渲染器。这是我的 xml 的问题吗?
这是我的 xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/trendchart"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</ScrollView>
(目前 ScrollView 中唯一的东西是图表,我计划添加更多元素以使滚动成为必要,我只是希望它首先显示)
我也尝试在有和没有环绕线性布局的情况下显示它,结果是一样的。
【问题讨论】:
标签: android xml scrollview android-linearlayout achartengine