The borderRadius property does not adhere to the default unit set in tiapp.xml. Both borderWidth and borderRadius only accept Number, so it's not possible to workaround by explicitly setting the unit. Like most other dimension-related properties (except fontSize as far as I know) borderWidth does use the default unit.
- Create a new app
- Replace the code in app.js by:
- Run the app on both iOS and Android and the result will be like screenshots 1 and 2.
- Now set the default unit to dp by adding this to the tiapp.xml:
- Run the app on both platforms again and the result will be like screenshots 1 and 3. As you can see because of the DPI of the tested device the border radius is about half of what we expected.