Search in sources :

Example 1 with ConstraintLayoutDecorator

use of com.android.tools.idea.uibuilder.scene.decorator.ConstraintLayoutDecorator in project android by JetBrains.

the class SceneMergeTest method testBasicScene.

public void testBasicScene() {
    myScreen.get("@+id/root").expectXml("<merge xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" + "      xmlns:tools=\"http://schemas.android.com/tools\"\n" + "  android:id=\"@+id/root\"\n" + "  android:layout_width=\"1000dp\"\n" + "  android:layout_height=\"1000dp\"\n" + "  tools:parentTag=\"android.support.constraint.ConstraintLayout\"/>");
    SceneComponent component = myScene.getSceneComponent("root");
    assertTrue(component.getDecorator() instanceof ConstraintLayoutDecorator);
    Project project = component.getNlComponent().getModel().getProject();
    ViewHandler viewGroupHandler = ViewHandlerManager.get(project).getHandler(component.getNlComponent());
    assertTrue(viewGroupHandler instanceof ConstraintLayoutHandler);
}
Also used : Project(com.intellij.openapi.project.Project) ConstraintLayoutHandler(com.android.tools.idea.uibuilder.handlers.constraint.ConstraintLayoutHandler) ViewHandler(com.android.tools.idea.uibuilder.api.ViewHandler) ConstraintLayoutDecorator(com.android.tools.idea.uibuilder.scene.decorator.ConstraintLayoutDecorator)

Aggregations

ViewHandler (com.android.tools.idea.uibuilder.api.ViewHandler)1 ConstraintLayoutHandler (com.android.tools.idea.uibuilder.handlers.constraint.ConstraintLayoutHandler)1 ConstraintLayoutDecorator (com.android.tools.idea.uibuilder.scene.decorator.ConstraintLayoutDecorator)1 Project (com.intellij.openapi.project.Project)1