图表控件我用的是AchartEngine
设置好数据和样式之后
用ChartFactory.getXXXXXChartView方法,获得图表的View
然后通过linearLayout.addView(getPieView());
填充到vertical的线性布局里面
填充一个图表的View时,显示是正常的
但填充2个或以上的时候,就只会显示第一个
后面我在线性布局外层又添加了一个垂直的ScrollView
也不行,也只是显示第一个而已
xml布局如下
请问有什么解决方法吗,让这个布局里面能显示多个图表的控件
设置好数据和样式之后
用ChartFactory.getXXXXXChartView方法,获得图表的View
然后通过linearLayout.addView(getPieView());
填充到vertical的线性布局里面
填充一个图表的View时,显示是正常的
但填充2个或以上的时候,就只会显示第一个
后面我在线性布局外层又添加了一个垂直的ScrollView
也不行,也只是显示第一个而已
xml布局如下
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/back"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请选择时间段:"
android:textColor="@color/gray_dark"
android:textSize="@dimen/normal" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<TextView
android:id="@+id/tv_tongji_yingyeXY_timestart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2015-06-07"
android:textColor="@color/gray_dark"
android:textSize="@dimen/normal" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:text="至"
android:textColor="@color/gray_dark"
android:textSize="@dimen/normal"
android:visibility="visible" />
<TextView
android:id="@+id/tv_tongji_yingyeXY_timeend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2015-07-10"
android:textColor="@color/gray_dark"
android:textSize="@dimen/normal" />
</LinearLayout>
</LinearLayout>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:id="@+id/layout_yingyeXYView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/back"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
</LinearLayout>
请问有什么解决方法吗,让这个布局里面能显示多个图表的控件