App Cloner 1.5.25 comes with a new tool called Layout inspector, which allows visualizing the view hierarchy of cloned apps. You can access it from the pop-up menu under the Cloned apps 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.
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.
- 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.