Android RTL 支持形状角半径

标签 android right-to-left shapes

我注意到没有 bottomEndRadius在形状中,而只是 bottomRightRadius

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="@color/colorPrimary" />
    <corners android:bottomRightRadius="5dp" />

</shape>

是否有任何解决方法来支持从右到左的布局?

最佳答案

我发现的唯一方法是为 RTL 资源使用单独的目录。例如,drawable-ldrtl/用于图形或 layout-ldrtl/用于布局。

查看此文档了解更多详细信息:https://developer.android.com/training/basics/supporting-devices/languages#MirroringAddResources

关于Android RTL 支持形状角半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56918398/

相关文章:

java - 在数据库中存储形状的最佳方式是什么

android - 保存网页以供离线使用并调用相同的 android

html - 为什么 "[x]y"在RTL方向显示不正确?

javascript - SVG 失去形状平滑度,点击时改变颜色

c - 给定带有标记单元格的二维数组,找到由这些标记单元格形成的重复形状

css - 根据其他规则应用 CSS 规则 - RTL 特定样式

android - 如何在 Android 上为 EditText 设置 MultiLine 和 imeOptions ="actionDone"?

android - 电子邮件附件的 Intent 过滤器

java - 在数组列表Java中拆分字符串

android - 波斯语 app_name 在 android 2.2 和 2.3 中无法正确显示