add debug overlay
Reviewed By: achen1 Differential Revision: D5659422 fbshipit-source-id: e95ed85884700b5e9bd084152e2cc89085fa66ad
This commit is contained in:
parent
ccc11f2f30
commit
e9d7711847
|
@ -0,0 +1,12 @@
|
|||
include_defs("//ReactAndroid/DEFS")
|
||||
|
||||
android_library(
|
||||
name = "debugoverlay",
|
||||
srcs = glob(["*.java"]),
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
],
|
||||
)
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.debug.debugoverlay;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/** Tag for a debug overlay log message. Name must be unique. */
|
||||
@Immutable
|
||||
public class DebugOverlayTag {
|
||||
|
||||
/** Name of tag. */
|
||||
public final String name;
|
||||
|
||||
/** Description to display in settings. */
|
||||
public final String description;
|
||||
|
||||
/** Color for tag display. */
|
||||
public final int color;
|
||||
|
||||
public DebugOverlayTag(String name, String description, int color) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.color = color;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
include_defs("//ReactAndroid/DEFS")
|
||||
|
||||
android_library(
|
||||
name = "tags",
|
||||
srcs = glob(["*.java"]),
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
react_native_dep("java/com/facebook/debug/debugoverlay:debugoverlay"),
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
],
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.debug.tags;
|
||||
|
||||
import android.graphics.Color;
|
||||
import com.facebook.debug.debugoverlay.DebugOverlayTag;
|
||||
|
||||
/** Category for debug overlays. */
|
||||
public class ReactDebugOverlayTags {
|
||||
|
||||
public static final DebugOverlayTag PERFORMANCE =
|
||||
new DebugOverlayTag("Performance", "Markers for Performance", Color.GREEN);
|
||||
}
|
Loading…
Reference in New Issue