Android XML Jump is an Android Studio plugin that jumps between Android layout XML files and the Java or Kotlin classes that use them.
When you are previewing or editing files such as activity_main.xml, item_user.xml, or fragment_home.xml, you no longer need to manually search R.layout.xxx, ViewBinding classes, or adapter usages across the project. Right-click the XML editor tab, choose Jump Between Layout and Owner, and the plugin opens the most likely owner class directly. If you run the same action from a Java or Kotlin class, it jumps back to the layout XML referenced by that class.
- Adds Jump Between Layout and Owner to the Android Studio editor tab right-click menu.
- Supports the default macOS shortcut:
Command+Ctrl+L. - Lets you customize the shortcut from Android Studio Keymap settings.
- Works with layout resources under
res/layout*, including folders such aslayout,layout-land, andlayout-sw600dp. - Supports two-way navigation:
- layout XML -> owner Java/Kotlin class
- Java/Kotlin class -> referenced layout XML
- Finds common layout usage styles:
R.layout.activity_main@layout/activity_mainActivityMainBinding- DataBinding/ViewBinding generated binding names
- Opens the owner class immediately when there is one clear match.
- Opens the layout XML immediately when one clear layout reference is found in a class.
- Shows a chooser when there are multiple possible targets.
- Open an Android layout XML file, for example
res/layout/activity_main.xml. - Right-click the XML file tab at the top of the editor.
- Click Jump Between Layout and Owner.
- Android Studio opens the Java or Kotlin class that references the layout.
You can also use the same action from a Java or Kotlin file:
- Open a class that contains a layout reference such as
R.layout.activity_mainorActivityMainBinding. - Right-click the class file tab at the top of the editor.
- Click Jump Between Layout and Owner.
- Android Studio opens the matching XML layout file.
Open or focus a layout XML file, Java file, or Kotlin file, then press:
Command+Ctrl+L
The default shortcut can be changed in Android Studio:
Settings/Preferences -> Keymap -> search "Jump Between Layout and Owner"
The plugin combines IntelliJ Platform indexes with Android-specific fallback checks:
- It first asks IntelliJ's reference index for usages of the current XML resource.
- If no direct reference is found, it searches indexed project text for common Android layout references.
- It filters out XML files and opens the surrounding Java/Kotlin class or source file.
- When running from a Java/Kotlin class, it extracts layout names from
R.layout.xxx,@layout/xxx, andXxxBinding, then opens the matchingres/layout*/xxx.xmlfile.
This makes it useful for Activity, Fragment, Adapter, custom View, ViewBinding, and DataBinding workflows.
-
Build the plugin zip:
gradle buildPlugin
-
Open Android Studio.
-
Go to:
Settings/Preferences -> Plugins -
Click the gear icon and choose Install Plugin from Disk....
-
Select:
build/distributions/android-xml-jump-0.1.6.zip -
Restart Android Studio.
After the plugin is published and approved on JetBrains Marketplace, it can be installed directly from Android Studio:
Settings/Preferences -> Plugins -> Marketplace -> search "Android XML Jump"
- macOS, Windows, or Linux
- JDK 21
- Gradle 9.6.1 or the included Gradle Wrapper
- Android Studio 2024.2+ target platform
gradle buildPluginThe generated plugin zip is written to:
build/distributions/
gradle runIdeTo make the plugin searchable inside Android Studio, it must be uploaded to JetBrains Marketplace and pass JetBrains review.
For the first release, JetBrains Marketplace requires a manual upload from the Marketplace web UI so you can create the plugin listing and set required metadata such as license, repository URL, vendor information, and plugin category.
-
Build the plugin zip:
gradle buildPlugin
-
Open JetBrains Marketplace in your browser.
-
Create a new plugin listing.
-
Upload:
build/distributions/android-xml-jump-0.1.6.zip -
Set the repository URL:
https://github.com/itgoyo/android-xml-jump -
Submit the plugin for JetBrains review.
After the first Marketplace upload exists, later versions can be published from Gradle with a Marketplace token:
-
Export the token locally:
export PUBLISH_TOKEN="YOUR_MARKETPLACE_TOKEN"
-
Publish the plugin:
gradle publishPlugin
The Gradle build reads the token from the PUBLISH_TOKEN environment variable. Do not commit the token to GitHub.
src/main/kotlin/com/itgoyo/androidxmljump/GoToLayoutOwnerAction.kt
src/main/resources/META-INF/plugin.xml
docs/images/editor-tab-menu.png
build.gradle.kts
Android Studio plugin, Android layout XML, jump to Activity, jump to Fragment, ViewBinding, DataBinding, IntelliJ Platform plugin.
