简体   繁体   中英

What is the difference between paddingBottom and paddingEnd in a TextView?

I understand the difference between padding and margin, but I don't understand the difference between those two pairs of attributes: bottom and end and on the other hand start and top. Documentation

It's pretty clear: your TextView has a bound and padding is distance from the bound to the context (where text is rendered) 在此处输入图像描述

In the picture, padding is green area.

  • paddingTop is upper distance
  • paddingBottom is down distance
  • paddingStart is right distance if rtl is enabled, otherwise it's left distance
  • paddingEnd is left distance if rtl is enabled, otherwise it's right distance

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