How can I create a new activity from IntelliJ?


How can i create a new Activity from IntelliJ for Android PRoject, and this automatically generates xml File and .Class

Choose the class from the source folder where you want to create the activity.

Right click.

Choose New > Android Component.

In the New Android Component Dialogue choose Kind > Activity.

Name your Activity and save. You will get a Java source file created that extends Activity and <activity android:name=".view.Sample"/> line in the AndroidManifest.xml.