起初我以为当我将系统语言更改为阿拉伯语时,drawableStart 会自动更改图标的位置,这是一种从右到左书写的语言。但是当我这样做时,什么也没有发生。 所以我猜它们是一样的?
最佳答案
我不确定上面的答案是否正确。根据我的实验,除非您更改语言并启用 RTL 支持,否则图标总是出现在同一个地方。
drawableStart
和 drawableEnd
仅在您 enable RTL support 时开始切换边API 级别 17 及以上。
Change all of your app's "left/right" layout properties to new "start/end" equivalents.
If you are targeting your app to Android 4.2 (the app's targetSdkVersion or minSdkVersion is 17 or higher), then you should
use “start” and “end” instead of “left” and “right”. For example,
android:paddingLeft should become android:paddingStart.If you want your app to work with versions earlier than Android 4.2 (the app's targetSdkVersion or minSdkVersion is 16 or less), then you should add “start” and end” in addition to “left” and “right”. For example, you’d use both android:paddingLeft and android:paddingStart.
关于android - EditText 中的 drawableLeft 和 drawableStart 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13907618/