I solved it by adding a "drawable"-folder in res/ and by moving the xml-file with the swapped values in drawable-hdpi to the "drawable"-folder.
So at the end your folder structure should look like this:
- drawable (xml-file with swapped values)
- drawable-hdpi
- drawable-ldpi
- drawable-mdpi
- drawable-v12 (xml-file with the correct values)
- drawable-xdpi
Android: Button - Swapped rounded Corners APIs 8 till 12 - How to fix it?
-
06-07-2023 - |
سؤال
I know that this is a known bug, so I've tried following solution:
How can I work around Android issue 9161, where bottomRightRadius and bottomLeftRadius are swapped?
(See answer Joss Stuart)
My drawables folder structure:
- drawable-hdpi (here I planted the xml-file with the swapped values)
- drawable-ldpi
- drawable-mdpi
- drawable-v12 (here I planted the xml-file with the correct values)
- drawable-xdpi
On Android API 8 - 12 the button's rounded corners are shown correctly, but are swapped on API 17.
It seems that my Android API 17 is not getting the xml-file values from the drawable-v12 folder.
Does anybody know why and how to fix this?
Thank you.
المحلول
لا تنتمي إلى StackOverflow