How can I switch between the tabs of a TabHost in the UI Designer for inserting content? Is there a keyboard shortcut or something else
3 Answers
I found a way to visualise any tab using TabHost in the UI Designer. Is probably not the best way, but it works. 1. Go to the Component Tree, where you have all the elements of the UI. 2. Inside the FrameLayout that TabHost automatically creates for you, there are the tabs. 3. If you change the order of the tabs just drag and dropping in the Component Tree, you get to see the one that is placed in the first position.

- 11
- 1
UPDATE:
According to this answer there is no way to change the tabs of a TabHost. That question refers to IntelliJ; I don't know if it applies to Android Studio.
Also, it seems that TabHost has been replaced by FragmentActivity
and ActionBar
. See Android how can i replace the deprecated tabhost? for a discussion.
It is defined as "Select next Tab in multi-editor file" in Settings -> Keymap.
On Windows it seems to default to CRTL+SHIFT+RIGHT/LEFT or ALT+SHIFT+RIGHT/LEFT. On my Mac it defaults to CTRL+SHIFT+RIGHT/LEFT.
Note that Studio doesn't allow the default Keymap to be edited so you will first need to copy the default and give it a new name.
Also see Shortcut to switch between design and text in android studio.
-
Thanks for this. But i mean the TabHost Tabs in Designer. – nicBit May 14 '14 at 10:03
-
I see. That's entirely different, and I've edited the question to mention it. – tar May 14 '14 at 10:11
By mouse, select the FrameLayout
then long left click on any space in it.

- 335
- 2
- 12