2
我有一个LiveChart。我将它添加为Linealayout的视图。但是当应用程序运行时我看不到它。这是我的代码:AChartEngine as View is not displayed
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));
我改变了它。但我的解决方案是复制xml文件并使用新文件。我不知道为什么它现在正在工作。但感谢您的帮助! – MasterCrumble