android - Android RTL support for shapes corners radius
问题描述
I notice that there is no bottomEndRadius
in shapes but instead just 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>
Is there any work around this to support right-to-left layouts?
解决方案
我发现的唯一方法是为 RTL 资源使用单独的目录。例如,drawable-ldrtl/ 用于图形或 layout-ldrtl/ 用于布局。
查看此文档了解更多详细信息:https ://developer.android.com/training/basics/supporting-devices/languages#MirroringAddResources
推荐阅读
- javascript - 如何在 html 和 js 中的 h1 中显示变量 Valor
- sql - SQL Server - 如果日期出现多次,则删除较旧的日期时间条目
- node.js - 在 nodejs 上发布 base64 数据以表达服务器有问题
- python - 如何在使用 YAML(无服务器)部署具有胶水版本 1.0 的 AWS 胶水作业时选择 python 版本 3
- php - 看懂C源码,rand的PHP实现
- jquery - 在边缘浏览器中的 asp.net mvc 验证错误中使用 jQuery datepicker
- python - 如何在不使用事件的情况下使用 Discord.py 发表评论?
- r - 编写自定义函数时将列名传递给 dplyr::coalesce()
- java - 如何在 Java 中将每个标签与其 Textfield 旁边的对齐?
- python - AttributeError:模块“asyncio.coroutines”没有属性“_is_coroutine”