android在java中动态改变控件大小

在java代码如下:

ImageButton exitbot =(ImageButton) findViewById(R.id.exit);
ViewGroup.LayoutParams exitbotn = (ViewGroup.LayoutParams)exitbot.getLayoutParams();
exitbotn.width = botwidth;
exitbotn.height = botheight;

猜你喜欢

转载自dblog.iteye.com/blog/1975995
今日推荐