Layout inspector

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:

  • Highlight
    Marks the view in yellow, so it can be spotted easily inside the cloned app.
  • Show
    Shows the view. Hidden views only.
  • Hide
    Hides the view. Visible views only. Requires the Medium donation.
  • Enable
    Enables the view. Disabled views only.
  • Disable
    Disables the view. Enabled views only.
  • Check
    Allows selecting check-boxes, toggles or radio buttons. Checkable unchecked views only.
  • Uncheck
    Allows deselecting check-boxes, toggles or radio buttons. Checkable checked views only.
  • Click
    Sends a click event to the view (emulates a tap).
  • Focus
    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.

Floating app vs Free-form window vs Multi-window support

Here’s a short description on the differences between these similar options.

The option Multi-window support sets a flag to indicate the app is split-window capable. The Android system will then allow the app to be used in split window configuration. Normally this is limited to two apps visible at the same time.

The option Free-form window enables launching the app as a floating window but the implementation of these floating windows comes from the Android system and requires Android 7.0 or higher.

The option Floating app uses a custom floating window implementation that also works prior to Android 7.0 and may, in some cases, work better than free-form windows.

If you want to keep apps running and active in the background (e.g. prevent videos from being paused as the focus moves to another app), you should also consider enabling the Multi-window no pause option. This can be used in conjunction with any of the above options.