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