Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open files in the current tab in Android Studio

Is there a way to open a file in the current tab that is open, rather than opening it in a new tab every time? I'm essentially looking for navigation behavior more similar to Xcode, where the files opened are kept on a navigation stack so I can move backward/forward between files that were open in the same tab. The default in Android studio appears to be that every new file is opened in a new tab.

I only ask because I'm the type that prefers to explicitly manage what tabs are open, and not have to close tabs after a quick glance at a file.

Thanks!

like image 624
timgcarlson Avatar asked Sep 10 '25 22:09

timgcarlson


2 Answers

Under File > Settings > Editor > General > Editor Tabs set Tab Limit to 1

like image 131
Chris Stillwell Avatar answered Sep 12 '25 14:09

Chris Stillwell


Even though it's an old question I believe more accurate answer is:

File > Settings > Editor > General > Editor Tabs

Select checkbox at the bottom

Open declaration source in the same tab

This way the source file will replace the current tab while navigating through declarations. Besides you still get to keep other tabs open. No need to limit number of tabs.

like image 35
Fatih Avatar answered Sep 12 '25 14:09

Fatih