Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android A不显示发动机作为视图_Android_Android Layout_Achartengine - Fatal编程技术网

Android A不显示发动机作为视图

Android A不显示发动机作为视图,android,android-layout,achartengine,Android,Android Layout,Achartengine,我有一张动态图表。我将其作为视图添加到线性布局中。但当应用程序运行时,我看不到它。这是我的代码: view = ChartFactory.getTimeChartView(this, dataset, renderer, "Live View"); view.refreshDrawableState(); view.repaint(); linearLayout = (LinearLayout) findViewById(R.id.LinearLayout1); linearLayout.ad

我有一张动态图表。我将其作为视图添加到线性布局中。但当应用程序运行时,我看不到它。这是我的代码:

view = ChartFactory.getTimeChartView(this, dataset, renderer, "Live View");
view.refreshDrawableState();
view.repaint();

linearLayout = (LinearLayout) findViewById(R.id.LinearLayout1);
linearLayout.addView(view, 0, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

图表视图的布局参数可能错误。我建议您使用
FILL\u PARENT
表示宽度,使用
WRAP\u CONTENT
表示高度。

我更改了它。但我的解决方案是复制xml文件并使用新文件。我不知道为什么它现在起作用了。但是谢谢你的帮助!