标签:android style blog http color ar java sp on
注意,你要改变组件的部分,要在XML中将其设置为warp_content.比如
你如果要改变button宽度,在xml中就要将其layout_width设置为wrap_content
在代码中动态设置宽度是通过设置设置LayoutParams来达到效果的
ImageView pictureView = (ImageView) convertView.findViewById(R.id.picture_view); ViewGroup.LayoutParams layoutParams=holder.picture.getLayoutParams(); layoutParams.width = 1024; layoutParams.height = 768; pictureView.setLayoutParams(layoutParams);
标签:android style blog http color ar java sp on
原文地址:http://blog.csdn.net/howlaa/article/details/40538091