的LinearLayout achartengine图滚动型中不显示 [英] LinearLayout achartengine Chart not displaying in ScrollView
问题描述
我试图创建一个滚动视图内achartengine的图表,但它不会显示!它只是显示一个黑色的屏幕,但不会崩溃或任何东西。问题是,如果我只是我的标签更改图表显示就好了。而在我的Java code我有renderer.setInScroll(真正的);在图表渲染器。这是我的XML的问题?
I'm trying to create an achartengine chart within a scrollview but it won't display! It just shows a black screen, but doesn't crash or anything. The thing is if I just change my tag to the chart displays just fine. And in my Java code I do have renderer.setInScroll(true); for the charts renderer. Is this an issue with my 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>
(目前在滚动型的唯一的事情就是图我计划添加更多的元素,使滚动必要的,我只是希望它显示第一)
(Currently the only thing in the ScrollView is the chart I plan to add more elements to make scrolling necessary, I just want it to display first)
另外我试图使用和不缠绕的LinearLayout既显示它与它是相同的结果。
Also I have tried to display it both with and without the wrapping linearlayout and it is the same result.
推荐答案
根据滚动视图,你必须插入
Under the scrollview you have to insert
android:fillViewport="true"
这篇关于的LinearLayout achartengine图滚动型中不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!