简体   繁体   中英

align image on image button android

I am trying to implement the alignment feature ContentVertical Alignment found in ios for the android image button. It would be easier to use setGravity() however, image button does not support this method. Is there a way to work around this somehow?

Try scaleType attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM