LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT)
params.setMargins(0, 5, 2, 0)
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT)
params.setMargins(0, 5, 2, 0)
WindowManager windowManager = getWindowManager()Display display = windowManager.getDefaultDisplay()
WindowManager.LayoutParams lp = getWindow().getAttributes()
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.height = WindowManager.LayoutParams.MATCH_PARENT
getWindow().setAttributes(lp)
HorizontalScrollView hv = new HorizontalScrollView(context)hv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT))hv.setFillViewport(true)hv.addView(listview)mainPanel.addView(hv)这样不管用,郁闷ing。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)