我正在使用library.It覆盖整个活动屏幕来显示折线图。任何人,请建议我如何在图表中插入布局,反之亦然。
提前谢谢。
你好,Rajendra
发布于 2013-09-13 19:46:46
在xml中创建线性布局,如下所示
<LinearLayout
android:id="@+id/graph_lay1"
android:layout_width="300dp"
android:layout_height="fill_parent"
android:layout_below="@+id/graph_lay1_txt12"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:layout_marginTop="40dp"
android:layout_weight="1"
android:orientation="horizontal" >
</LinearLayout>然后像这样将图表视图移植到这个线性布局中,
GraphicalView v;
v = ChartFactory
.getTimeChartView(this, dataset, mRenderer, "hh:aa");
getLinearLay(R.id.graph_lay1).addView(
v,
new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));希望这能对你有所帮助
https://stackoverflow.com/questions/18785070
复制相似问题