朋友,
我想用java code或动态设置layout_marginBottom
在列表视图或LinearLayout中
任何一个指导我如何实现这一目标?
任何帮助将是AP preciated。
解决方案 的ListView LST = getListView();LinearLayout.LayoutParams PARAMS =新LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT );params.setMargins(0,0,0,0); //左,上,右,下lst.setLayoutParams(PARAMS);
friends,
i want to set layout_marginBottom using java code or dynamically
in list view or linearlayout
any one guide me how to achieve this?
any help would be appreciated.
解决方案ListView lst=getListView();
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT
);
params.setMargins(0, 0, 0, 0); //left,top,right,bottom
lst.setLayoutParams(params);