Skip to main content

Creating new Project in Android Studio

Step 1: Create a New Project

If you didn't have a project opened, Android Studio shows the Welcome screen. To create a new project, click New Project.
If you had a project opened, Android Studio shows the development environment. To create a new project, click File >New Project.
The next window lets you configure the name of your app, the package name, and the location of your project.

Enter the values for your project and click Next.

Step 2: Select Form Factors and API Level

The next window lets you select the form factors supported by your app, such as phone, tablet, TV, Wear, and Google Glass. For each form factor, you can also select the API Level that your app requires. To get more information, click Help me choose.

The API Level window shows the distribution of mobile devices running each version of Android, as shown in Figure 2. Click on an API level to see a list of features introduced in the corresponding version of Android. This helps you choose the minimum API Level that has all the features that your apps needs, so you can reach as many devices as possible. Then click OK.

Then, on the Form Factors Window, click Next.

Step 3: Add an Activity

The next screen lets you select an activity type to add to your app, as shown in Figure 4. This screen depends on the form factors you selected earlier.

Choose an activity type and click Next.

Step 4: Configure Your Activity

The next screen lets you configure the activity to add to your app, as shown in Figure 6.

Enter the activity name, the layout name, and the activity title. Then click Finish.

Step 5: Develop Your App

Android Studio creates the default structure for your project and opens the development environment. If your app supports more than one form factor, Android Studio creates a module for each of them,


Popular posts from this blog

Android Basic Tutorial : Get the Current Date and Time

Here’s a code snipped to get the current date and/or time. This snipped uses the Calendar object (java.util.Calendar) which is a useful class when working with dates.

//Get a calendar object for the current date and time Calendar CurrentDateTime = Calendar.getInstance();
//Example: Get current day of the month

Switch : Material Design Tips

From google material design documentation.
On/off switches toggle the state of a single settings option. The option that the switch controls, as well as the state it’s in, should be made clear from the corresponding inline label. Switches take on the same visual properties of the radio button.
The on/off slide toggle with the text “on” and “off” included within the asset is deprecated. Use the switch shown here instead. How to add? I. In your build.gradle add latest appcompat library. dependencies { compile ''// where X.X.X version} II. Make your activity extend publicclassMainActivityextendsAppCompatActivity{...} III. Declare your SwitchCompat inside any layout.xml file <"wrap_content"android:layout_height="wrap_content"android:checked="true"/> SwitchCompat is a backward compatible version of the Switc…