Search in sources :

Example 6 with LayoutLog

use of com.android.ide.common.rendering.api.LayoutLog in project android_frameworks_base by AOSPA.

the class RenderAction method setUp.

/**
     * Sets up the session for rendering.
     * <p/>
     * The counterpart is {@link #tearDown()}.
     */
private void setUp() {
    // setup the ParserFactory
    ParserFactory.setParserFactory(mParams.getLayoutlibCallback().getParserFactory());
    // make sure the Resources object references the context (and other objects) for this
    // scene
    mContext.initResources();
    sCurrentContext = mContext;
    // create an InputMethodManager
    InputMethodManager.getInstance();
    LayoutLog currentLog = mParams.getLog();
    Bridge.setLog(currentLog);
    mContext.getRenderResources().setFrameworkResourceIdProvider(this);
    mContext.getRenderResources().setLogger(currentLog);
}
Also used : LayoutLog(com.android.ide.common.rendering.api.LayoutLog)

Example 7 with LayoutLog

use of com.android.ide.common.rendering.api.LayoutLog in project android_frameworks_base by crdroidandroid.

the class RenderAction method setUp.

/**
     * Sets up the session for rendering.
     * <p/>
     * The counterpart is {@link #tearDown()}.
     */
private void setUp() {
    // setup the ParserFactory
    ParserFactory.setParserFactory(mParams.getLayoutlibCallback().getParserFactory());
    // make sure the Resources object references the context (and other objects) for this
    // scene
    mContext.initResources();
    sCurrentContext = mContext;
    // create an InputMethodManager
    InputMethodManager.getInstance();
    LayoutLog currentLog = mParams.getLog();
    Bridge.setLog(currentLog);
    mContext.getRenderResources().setFrameworkResourceIdProvider(this);
    mContext.getRenderResources().setLogger(currentLog);
}
Also used : LayoutLog(com.android.ide.common.rendering.api.LayoutLog)

Aggregations

LayoutLog (com.android.ide.common.rendering.api.LayoutLog)7 LayoutLibrary (com.android.ide.common.rendering.LayoutLibrary)1 Bridge (com.android.layoutlib.bridge.Bridge)1 ILogger (com.android.utils.ILogger)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 File (java.io.File)1 BufferingFileWrapper (org.jetbrains.android.util.BufferingFileWrapper)1 Nullable (org.jetbrains.annotations.Nullable)1