简体   繁体   English

实现内容边缘插入按钮 android

[英]implement content edge insets button android

This is rather tough for me.这对我来说相当困难。 I am trying to implement the content edge insets feature found in the ios for android button.我正在尝试为 android 按钮实现 ios 中的内容边缘插入功能。 I believe this enables positioning of the content inside the button based on top, bottom, left and right values.我相信这可以根据顶部、底部、左侧和右侧的值来定位按钮内的内容。 Does anyone have a clue?有人有线索吗?

Use the attributes:使用属性:

android:paddingTop
android:paddingBottom
android:paddingLeft
android:paddingRight

This controls the amount of 'empty' space between the border of the button and the text.这控制按钮边框和文本之间的“空白”空间量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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