Android Studio has an interesting tool for quick prototyping of activity screens. As the authors say on
their page - this is so far only a preliminary test of the pen and this tool will be further developed. The editor can be useful for both designers and novice developers.
I decided to play a little with the editor.
So, you launched Android Studio and created a simple one-button example. Go to the menu and select
Tools | Android | Navigation Editor . A new tab of the
main.nvg.xml file and the editor itself will appear on the screen, where you can see the form of your activity with the button and with the arrow that connects to the
Settings menu item. So far, nothing interesting.
Then the magic begins. Right-click anywhere in the editor and call the context menu
New Activity ....
A standard wizard for creating a new activity appears. Fill in the fields and move on.
')

As soon as we clicked the
Finish button, an image of the second activity will appear in the editor. Moreover, from the button from the first activity there is an arrow.

If you enter the class code, you will see that a blank has been generated there for clicking the button.
findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { MyActivity.this.startActivity(new Intent(MyActivity.this, SecondActivity.class)); } });
However, we will continue. We wanted to make the transition from the second to the third activity. Call the context menu again and create a new screen. But this time there will be no connection between the second and third activities.

No problem. Double-click on the second screen and find yourself in the markup editor. Add a button and go back to the Navigation Editor. The changes will be automatically applied and we will see the added button. Now select this button, hold down the Shift key and drag the button to the third activity. When you release the mouse, an arrow appears from the button to the third screen.

Moreover, in the middle there will be a drop-down list of two elements - swipe and press. Although I chose the
swipe option, in the code I still got the same template with onClick. In principle, it is logical for the button. But how to get the code for the svayp, I still do not understand. Can someone tell me?
Here is such an interesting tool. I must say that the product is still damp. During the experiments, the studio a couple of times cursed for a mistake. Yes, and use the habit is not quite comfortable.
I have to admit, for a year I was not used to the studio and still prefer the good old Eclipse. But Google is doing everything possible to force developers to switch to a new development environment. For the time being, I am recording new products for myself on a
separate page , but I can’t decide to go completely to the camp of Android Studio / IntelliJ fans.