如何在外部库中禁用RTL支持?

时间:2019-04-30 23:04:35

标签: android

我使用gradle导入了一个github库,除了它支持RTL并且我的项目不支持之外,它运行良好,我尝试使用:

tools:replace="supportsRtl" 

在我的清单上但没有用,任何建议?

1 个答案:

答案 0 :(得分:0)

在您的manifest文件中和application标记内,添加这两行。

<manifest>
    <application
        .
        .
        .
        android:supportsRtl="false"
        tools:replace="android:supportsRtl" //(replace libraries' Rtl support with ours)
        >
    </application>
</manifest>

当某些支持Rtl时,您必须在其manifest文件中进行更改,因此,如果要使用它们,必须替换其{{1 }}行代码。