Android - 特定制造商的备用资源
Android - alternate resources for specific manufacturer
我想要备用 特定 Android phone 制造商的资源,例如:三星、LG 等。
问题是一些 LG phones 不能正确地膨胀渐变,所以我想为这个品牌提供一个替代资源。
Binary XML file line #14: Binary XML file line #14: Error inflating class <unknown>
android.view.LayoutInflater.inflate
其中第 14 行:是具有渐变的矢量路径。
您可以找到有关如何根据语言、屏幕尺寸、触摸屏类型等提供不同资源文件的信息here。
我找不到任何关于是否可以根据制造商字符串区分布局的信息。
理想情况下,这类似于:
res/
drawable-qwerty/
drawable-man_lg/
I can't find any information on whether you can differentiate layouts based on manufacturer string or not.
资源系统中没有这个选项,抱歉。 Java/Kotlin 代码可以根据 Build
值做出决定,但资源不能。
我想要备用 特定 Android phone 制造商的资源,例如:三星、LG 等。 问题是一些 LG phones 不能正确地膨胀渐变,所以我想为这个品牌提供一个替代资源。
Binary XML file line #14: Binary XML file line #14: Error inflating class <unknown>
android.view.LayoutInflater.inflate
其中第 14 行:是具有渐变的矢量路径。
您可以找到有关如何根据语言、屏幕尺寸、触摸屏类型等提供不同资源文件的信息here。
我找不到任何关于是否可以根据制造商字符串区分布局的信息。
理想情况下,这类似于:
res/
drawable-qwerty/
drawable-man_lg/
I can't find any information on whether you can differentiate layouts based on manufacturer string or not.
资源系统中没有这个选项,抱歉。 Java/Kotlin 代码可以根据 Build
值做出决定,但资源不能。