The Layout inspector is a tool that allows visualizing the view hierarchy of cloned apps. You can access it from the pop-up menu under the Clones > Installed clones tab.
Views are shown in a hierarchical tree, where you can tap the nodes to expand or collapse view groups (parent views that contain child views). Each node shows the view’s class name, e.g. LinearLayout, TextView, Button, etc. If a view has an identifier, it will be shown after the @ symbol. If a view has text (e.g. TextView, EditText or a text button), the text is shown in quotes. If a view is hidden or disabled you will see the Hidden or Disabled tags accordingly.
Starting with App Cloner 2.10 the layout inspector also view positions. The format is [left, top] – [right, bottom] = width x height. Use the toolbar’s pop-up menu to switch between px (pixels) and dp (density-independent pixels, an abstract unit that is based on the physical density of the screen).
A DecorView represents the top of a view hierarchy. When an app is showing multiple windows or dialogs, you will have multiple top-level DecorView nodes. If the tree is completely empty, it means the app isn’t showing any activities or windows (you will probably need to launch the clone first).
The pop-up menu shown for each node allows the performing the following actions:
Marks the view in yellow, so it can be spotted easily inside the cloned app.
Shows the view. Hidden views only.
Hides the view. Visible views only. Requires the Medium donation.
Enables the view. Disabled views only.
Disables the view. Enabled views only.
Allows selecting check-boxes, toggles or radio buttons. Checkable unchecked views only.
Allows deselecting check-boxes, toggles or radio buttons. Checkable checked views only.
Sends a click event to the view (emulates a tap).
Requests the view to receive focus.
- Copy class
Copies the view class to the clipboard. Useful for the Modify views option.
- Copy identifier
Copies the view identifier to the clipboard. Useful for the Modify views option.
- Copy text
Copies the view text to the clipboard. Text views only.
- Copy position
Copies the view position to the clipboard. It also includes the unit (px or dp). Useful for the Modify views option.
- Edit text
Allows editing the current view text. Text views only.
Note that any modified views may be quickly overwritten or reset by the cloned app. Especially when modifying views inside scrolling lists, the views are likely going to be replaced as soon as you scroll the list or when the app refreshes the list’s data. If you receive the message ‘Action was not performed’, the view hierarchy may no longer be valid. In this case tap the Refresh button in the toolbar to reload the view tree.
You may use the Search button to enter a search query. This will expand the tree and highlight any views whose class, identifier or view text contain the query text.
You can use the toolbar’s pop-up menu to expand or collapse all tree nodes or to clear any Highlight actions. In case the tree view contains deeply indented nodes, you can also scroll it horizontally.
You must be logged in to post a comment.