Conflicting lint messages regarding paddingStart usage

后端 未结 2 856
囚心锁ツ
囚心锁ツ 2021-02-06 21:55

After API 17 / RTL support was released, I added the following to my manifest

android:supportsRtl="true"

which caused Lint to rightfull

相关标签:
2条回答
  • 2021-02-06 22:40

    You're right about the root cause of the issue - Samsung defined a custom attribute for the id reserved for paddingStart or paddingEnd.

    The way I by-passed this was to extract the padding properties and put them into a style. So instead of having different layouts for SDK<17 and SDK>=17, I have different styles for them (with paddingLeft&Right in values and paddingStart&End in values-v17).

    This way, Lint will stop complaining about it.

    0 讨论(0)
  • 2021-02-06 22:40

    Its just a suggestion. I hope you have solved your problem by now. If you set your minimum SDK level below 4.1, then you have to explicitly mention the padding as paddingLeft and paddingStart. For SDK level above 4.1, you can use paddingStart. I am guessing (as I have never faced it before), as you set your SDK level to 2.2 or below 4.1, android sdk level is going crazy.

    0 讨论(0)
提交回复
热议问题