UI preview of selected element
Summary: This is a prototype for view preview within Flipper. If enabled, a preview of the selected element is rendered in the attribute inspector. Changelog: Add view preview/snapshot for the Layout plugin on Android. Reviewed By: mweststrate Differential Revision: D35009246 fbshipit-source-id: a442ff7f57093f463016811f0f451b52f579b448
This commit is contained in:
committed by
Facebook GitHub Bot
parent
aed7e7e6f2
commit
cfdb363ab4
@@ -10,6 +10,7 @@ package com.facebook.flipper.plugins.inspector;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import com.facebook.flipper.core.FlipperConnection;
|
||||
import com.facebook.flipper.core.FlipperDynamic;
|
||||
import com.facebook.flipper.core.FlipperObject;
|
||||
@@ -72,6 +73,11 @@ public class DescriptorMappingTest {
|
||||
@Override
|
||||
public void setHighlighted(T t, boolean b, boolean b1) throws Exception {}
|
||||
|
||||
@Override
|
||||
public Bitmap getSnapshot(T t, boolean b) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hitTest(T node, Touch touch) {}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.robolectric.annotation.LooperMode.Mode.LEGACY;
|
||||
|
||||
import android.app.Application;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -415,6 +416,11 @@ public class InspectorFlipperPluginTest {
|
||||
testNode.highlighted = b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bitmap getSnapshot(TestNode testNode, boolean includeChildren) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hitTest(TestNode node, Touch touch) {
|
||||
boolean finish = true;
|
||||
|
||||
Reference in New Issue
Block a user