0
我在我的應用程序中使用Afreechart實現了一個簡單的圖表,沒有任何問題。 該圖表在模擬器中以及我的舊3.5英寸設備中全屏顯示正確,但如果將其安裝在新的5英寸智能手機中,則圖表佔據屏幕高度的僅一半。AFreeChart Android全屏視圖
public class ChartActivity extends Activity {
private LinearLayout linearlayout;
/**
* Called when the activity is starting.
* @param savedInstanceState
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent myIntent = getIntent();
String sonda = myIntent.getStringExtra("sonda");
EconormaChart chartView = new EconormaChart(this, sonda);
requestWindowFeature(Window.FEATURE_NO_TITLE);
linearlayout = (LinearLayout) View.inflate(this, R.layout.chart, null);
linearlayout.addView(chartView);
setContentView(linearlayout);
}
}
XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
</LinearLayout>