AOSP customize aapt2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AOSP customize aapt2

Jonny Peng
I want to add a new resource configuration in my app, such as values-xxx-zh-rCN, but aapt2 don't support it, how can I customize it? I find that aapt2 support mcc mnc type values

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/7de12378-4878-4ec8-b336-a1ddffdc9715n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: AOSP customize aapt2

Arne-Christian Blystad
You'll probably need to modify a lot of places to get that to work... Have you considered just using Runtime Resource Overlays instead?

You can make resource overlays automatically enable for a specific device variant by, for example, doing this:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="app.i.want.to.overlay.mydevice">

<overlay android:targetPackage="app.i.want.to.overlay"

android:requiredSystemPropertyName="ro.boot.product.hardware.sku"

android:requiredSystemPropertyValue="MyDevice"

android:isStatic="true" />
</manifest>

You can also overlay framework resources if necessary, by declaring the overlay as

<overlay android:targetPackage="android" android:priority="1" android:category="android.theme" />

and setting

ro.boot.vendor.overlay.theme=overlay.package.name

Best regards,
Arne Christian
On Tuesday, 10 November 2020 at 21:10:26 UTC+1 [hidden email] wrote:
I want to add a new resource configuration in my app, such as values-xxx-zh-rCN, but aapt2 don't support it, how can I customize it? I find that aapt2 support mcc mnc type values

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/214eddb3-30a6-4ead-893d-1185786bdcf7n%40googlegroups.com.