aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJerome Gaillard <jgaillard@google.com>2022-06-06 18:02:13 +0100
committerJerome Gaillard <jgaillard@google.com>2023-02-07 18:44:53 +0000
commit6dc349b485562a32231ad559519d0efc619db298 (patch)
tree448dbf0354d8eb19d90ad4228612c0e5ee6d716a /common
parent4750e1cdf2158de3d76cbbbe9b8d159683caa3a0 (diff)
downloadlayoutlib-6dc349b485562a32231ad559519d0efc619db298.tar.gz
Add dynamic theming to layoutlib
Layoutlib receives the path to an image file to use as a wallpaper. It creates a dynamic theme reusing/copying what the framework is doing. It sets the dynamic theme by overriding access to system colors through the DynamicRenderResources wrapper. Bug: 227467236 Test: tests added Change-Id: Id37b531c5f29e57c37f5390804ddc58d27a9eeb0 (cherry picked from commit c8a05ec2abe059f44ea4371d71dbdcb2630ce4ec) Merged-In: Id37b531c5f29e57c37f5390804ddc58d27a9eeb0
Diffstat (limited to 'common')
-rw-r--r--common/src/com/android/tools/layoutlib/create/NativeConfig.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/src/com/android/tools/layoutlib/create/NativeConfig.java b/common/src/com/android/tools/layoutlib/create/NativeConfig.java
index 41df7c97f9..70146428e7 100644
--- a/common/src/com/android/tools/layoutlib/create/NativeConfig.java
+++ b/common/src/com/android/tools/layoutlib/create/NativeConfig.java
@@ -87,6 +87,7 @@ public class NativeConfig {
"android.graphics.Canvas#getClipBounds",
"android.graphics.ImageDecoder#decodeBitmapImpl",
"android.graphics.Typeface#create",
+ "android.graphics.drawable.AdaptiveIconDrawable#draw",
"android.graphics.drawable.AnimatedVectorDrawable#draw",
"android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorUI#onDraw",
"android.graphics.drawable.DrawableInflater#inflateFromClass",