timgcarlson
timgcarlson

Reputation: 3146

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!

Upvotes: 4

Views: 2864

Answers (3)

Fatih
Fatih

Reputation: 605

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.

Upvotes: 5

AndroidDev
AndroidDev

Reputation: 21237

Applying @ChrisStillwell's comment, for Mac users I believe that you want

Android Studio > Preferences > Editor > General > Editor Tabs then change the tab limit to 1.

Upvotes: 2

Chris Stillwell
Chris Stillwell

Reputation: 10547

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

Upvotes: 10

Related Questions