diff options
author | Xavier Ducrohet <xav@android.com> | 2011-04-01 14:11:47 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-06-23 14:17:59 -0700 |
commit | a84d8ef38565d59c5c71f7e5bbc1afcc6691c8f7 (patch) | |
tree | 4d8cd0d34bdb6c583ea8263a040878802b13692d /layoutlib_api/src/com | |
parent | 4833b2a443f9c101e21649389bec3992a48b9e66 (diff) | |
download | sdk-a84d8ef38565d59c5c71f7e5bbc1afcc6691c8f7.zip sdk-a84d8ef38565d59c5c71f7e5bbc1afcc6691c8f7.tar.gz sdk-a84d8ef38565d59c5c71f7e5bbc1afcc6691c8f7.tar.bz2 |
Sample code to use the layout rendering library.
This is very basic sample code showing how to render
a layout.
This explains how to load the resources, create Folderconfig,
ResourceResolver, and how to call the LayoutLibrary to do an
actual render.
There are some big limitations:
- can't render custom views because there's nothing
compiling them and generating the compiled R.class
file.
- not all features of ADT are present because there
are things that don't make sense outside of an editor
(render in context, expand empty layouts, etc...)
Change-Id: I0c8676ebfbff27f0e9412bb4b13193ce64082372
Diffstat (limited to 'layoutlib_api/src/com')
-rw-r--r-- | layoutlib_api/src/com/android/ide/common/rendering/api/DeclareStyleableResourceValue.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/DeclareStyleableResourceValue.java b/layoutlib_api/src/com/android/ide/common/rendering/api/DeclareStyleableResourceValue.java index 2b13d0b..0699766 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/DeclareStyleableResourceValue.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/DeclareStyleableResourceValue.java @@ -50,6 +50,10 @@ public class DeclareStyleableResourceValue extends ResourceValue { return null; } + public Map<String, Map<String, Integer>> getAllAttributes() { + return mEnumMap; + } + public void addValue(String attribute, String name, Integer value) { Map<String, Integer> map; |