2011-09-28 50 views

回答

0

設置畫廊的佈局參數,即大小,然後取一個佈局,並添加到它

LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(30, 30); 
gallery.setLayoutParams(layoutParams); 

LinearLayout mLinearLayout=(LinearLayout) findViewByID(R.id....); 
mLinearLayout.addView(gallery); 
+0

不工作,運行時異常 – beans

+2

發表您的logcat的錯誤 – jazz