Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add more shortcuts to android studio toolbar?

I just want to add few more shortcuts to the android studio toolbar like eclipse :

http://imageshack.com/a/img571/2480/ehn0.png

This is the image link: http://imageshack.com/a/img571/2480/ehn0.png

After I go to the settings for android studio, I see a option for menus and toolbars. I am just not sure how to add items to my toolbar from this point.

Some Image http://imageshack.com/a/img841/521/bz0a.jpg

These are the shortcuts I want to add:

1) To Create new class

2) New Android Layout

3) New Package

If possible, I also want to add some code stuff like :

1) Generate Getters and Setters

2) Override Methods

3) Add Unimplemented methods

4) Surround With

If anyone knows how to do it, it will be a great help for me and hopefully others too.

like image 527
mike20132013 Avatar asked Apr 10 '14 16:04

mike20132013


People also ask

How do I add an icon to the Android toolbar?

Now if you want to add other resolutions pictures to this drawable, just do it in the same manner. Step 5) And now go to the other folder which is Settings -> Androids-> drawable hdpi. And then go to your Android, then drawable, paste it here and inside this drawable-hdpi and click Ok.

How do I add tools to the menu bar?

Adding a custom tool to a menu or toolbarOpen the Customize window as described above and click the Commands tab. In the Categories list, scroll down and click [ Geoprocessing Tools ]. Click the Add Tools button. Browse to the toolbox containing the tool you want to add, choose the tool, then click OK.


2 Answers

I'm currently using Android Studio 3.6.1. Maybe you currently have toolbar unchecked, like I had. So first go to View -> Appearance and check Toolbar option.

select_appearance_under_the_view

After that, you'll be able to right click on a toolbar and you'll get option to choose:

customize_menus_and_toolbars

Choose option Customize menus and toolbars. You'll get the following dialog:

menus_and_toolbars

Choose main toolbar:

main_toolbar_chosen

Here, under main toolbar, you see all of the actions that are currently available on your screen. Now, choose the place where you want to add your action, and then click on +. add_action_or_separator

You can now search for the action you want to add. For example, I have searched for Open Dart DevTools action.

enter image description here

After you click on OK, the action will appear in your main toolbar. enter image description here

That's it. Happy coding.

like image 160
miloss Avatar answered Sep 20 '22 22:09

miloss


Right-click on the open space of the toolbar (your first image) and select Customize Menus and Toolbars....

Now open the Main Toolbar folder, select any item and then click the Add After... button (on the right).

Find what you want to add from the list of items available (you can also choose an icon) and click OK.

The new item is added :)

You can also re-arrange the items by selecting it and using the Move Up and Move Down buttons.

Click OK when done.

NOTE:
You can also do this from the settings (as per your second image) but it is faster to do by right-clicking the toolbar.

like image 42
free3dom Avatar answered Sep 18 '22 22:09

free3dom