Conflicting lint messages regarding paddingStart usage

后端 未结 2 860
囚心锁ツ
囚心锁ツ 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.

提交回复
热议问题