开发者

how to set image's margin top using coding not xml in android

开发者 https://www.devze.com 2023-01-14 19:56 出处:网络
i am usingandroid:la开发者_StackOverflowyout_marginTop=\"100dip\" in my imageview,i want to set margin top to each image depending its height using coding not using xml,how can i set image\'s marginto

i am using android:la开发者_StackOverflowyout_marginTop="100dip" in my imageview,i want to set margin top to each image depending its height using coding not using xml,how can i set image's margintop?


Use

public void setMargins (int left, int top, int right, int bottom) 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号