LinearLayout.LayoutParams btParams = new LinearLayout.LayoutParams (width, height);btParams.gravity = Gravity.CENTER;====================解决方案2==================== framelayout中设置imagebutton 的layout_gravity为center relativelayout,center属性为true 我也刚学O_o
本文共 427 字,大约阅读时间需要 1 分钟。
LinearLayout.LayoutParams btParams = new LinearLayout.LayoutParams (width, height);btParams.gravity = Gravity.CENTER;====================解决方案2==================== framelayout中设置imagebutton 的layout_gravity为center relativelayout,center属性为true 我也刚学O_o
转载于:https://www.cnblogs.com/meizhenfen42/p/4011116.html