新增 布局分析显示full id
This commit is contained in:
@@ -34,6 +34,7 @@ public class NodeInfoView extends RecyclerView {
|
|||||||
private static final String[] FIELD_NAMES = {
|
private static final String[] FIELD_NAMES = {
|
||||||
"id",
|
"id",
|
||||||
"idHex",
|
"idHex",
|
||||||
|
"fullId",
|
||||||
"bounds",
|
"bounds",
|
||||||
"depth",
|
"depth",
|
||||||
"desc",
|
"desc",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class NodeInfo {
|
|||||||
|
|
||||||
public String id;
|
public String id;
|
||||||
public String idHex;
|
public String idHex;
|
||||||
|
public String fullId;
|
||||||
public String desc;
|
public String desc;
|
||||||
public String className;
|
public String className;
|
||||||
public String packageName;
|
public String packageName;
|
||||||
@@ -60,7 +61,8 @@ public class NodeInfo {
|
|||||||
|
|
||||||
|
|
||||||
public NodeInfo(Resources resources, UiObject node, NodeInfo parent) {
|
public NodeInfo(Resources resources, UiObject node, NodeInfo parent) {
|
||||||
id = simplifyId(node.getViewIdResourceName());
|
fullId = node.getViewIdResourceName();
|
||||||
|
id = simplifyId(fullId);
|
||||||
desc = node.desc();
|
desc = node.desc();
|
||||||
className = node.className();
|
className = node.className();
|
||||||
packageName = node.packageName();
|
packageName = node.packageName();
|
||||||
@@ -96,8 +98,8 @@ public class NodeInfo {
|
|||||||
indexInParent = node.indexInParent();
|
indexInParent = node.indexInParent();
|
||||||
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
if (resources != null && packageName != null && id != null) {
|
if (resources != null && packageName != null && fullId != null) {
|
||||||
idHex = "0x" + Integer.toHexString(resources.getIdentifier(node.getViewIdResourceName(), null, null));
|
idHex = "0x" + Integer.toHexString(resources.getIdentifier(fullId, null, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user