|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.ide.common.rendering.api.Bridge
public abstract class Bridge
Entry point of the Layout Library. Extensions of this class provide a method to compute and render a layout.
Field Summary | |
---|---|
static int |
API_CURRENT
|
Constructor Summary | |
---|---|
Bridge()
|
Method Summary | |
---|---|
void |
clearCaches(java.lang.Object projectKey)
Clears the resource cache for a specific project. |
RenderSession |
createSession(SessionParams params)
Starts a layout session by inflating and rendering it. |
boolean |
dispose()
Prepares the layoutlib to unloaded. |
abstract int |
getApiLevel()
Returns the API level of the layout library. |
java.util.EnumSet<Capability> |
getCapabilities()
Returns an EnumSet of the supported Capability . |
int |
getRevision()
Returns the revision of the library inside a given (layoutlib) API level. |
Result |
getViewBaseline(java.lang.Object viewObject)
Deprecated. use the extended ViewInfo. |
Result |
getViewIndex(java.lang.Object viewObject)
Utility method returning the index of a given view in its parent. |
Result |
getViewParent(java.lang.Object viewObject)
Utility method returning the parent of a given view object. |
boolean |
init(java.util.Map<java.lang.String,java.lang.String> platformProperties,
java.io.File fontLocation,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> enumValueMap,
LayoutLog log)
Initializes the Bridge object. |
boolean |
isRtl(java.lang.String locale)
Returns true if the character orientation of the locale is right to left. |
Result |
renderDrawable(DrawableParams params)
Renders a Drawable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int API_CURRENT
Constructor Detail |
---|
public Bridge()
Method Detail |
---|
public abstract int getApiLevel()
Bridge
return at minimum an API level of 5.
public int getRevision()
getApiLevel()
.getRevision()
public java.util.EnumSet<Capability> getCapabilities()
EnumSet
of the supported Capability
.
EnumSet
with the supported capabilities.public boolean init(java.util.Map<java.lang.String,java.lang.String> platformProperties, java.io.File fontLocation, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> enumValueMap, LayoutLog log)
platformProperties
- The build properties for the platform.fontLocation
- the location of the fonts.enumValueMap
- map attrName => { map enumFlagName => Integer value }. This is typically
read from attrs.xml in the SDK target.log
- a LayoutLog
object. Can be null.
public boolean dispose()
public RenderSession createSession(SessionParams params)
RenderSession
on which further actions can be taken.
RenderSession
object that contains the result of the scene creation and
first rendering.public Result renderDrawable(DrawableParams params)
Result.getData()
. It is of type BufferedImage
params
- the rendering parameters.
public void clearCaches(java.lang.Object projectKey)
RenderParams
.
projectKey
- the key for the project.public Result getViewParent(java.lang.Object viewObject)
viewObject
- the object for which to return the parent.
Result
indicating the status of the action, and if success, the parent
object in Result.getData()
public Result getViewIndex(java.lang.Object viewObject)
viewObject
- the object for which to return the index.
Result
indicating the status of the action, and if success, the index in
the parent in Result.getData()
public boolean isRtl(java.lang.String locale)
locale
- The locale formatted as language-region
@Deprecated public Result getViewBaseline(java.lang.Object viewObject)
viewObject
- the object for which to return the index.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |