To make an Android application, you really want an Integrated Development Environment (IDE), and Android Studio is the authority IDE for making Android Apps.
Since Android Studio is prepared to utilize, you can begin by making your first undertaking. Give your venture a name and give it a novel bundle name as well. Then, at that point, pick the base SDK you need to help with your application.
As it says underneath the Minimum SDK bar, with every API level, the elements that you can use in your application increment. In any case, your application will run on less gadgets. The Create New Project exchange incorporates an assessor for the level of gadgets your application will run on.
You will then, at that point, be approached to choose the design of your application. We should pick Empty Activity so we have a ton of space to try and learn.
When you give your action a name-we should name it Main Activity for this instructional exercise Android Studio will pause for a minute to make your first task. Presently, you have before you the fundamental code manager where you will actually want to compose the code for your application.
The enormous area on your right is the Editor Window, where you compose the code of your application. To your left side and beneath that are the apparatus windows. These let you effectively explore and deal with a particular assignment of your task, for instance perusing records or review investigating data.
The two bars that you see on top are the Toolbar, which permits you to perform normal errands in Android Studio, such as building, running, and troubleshooting applications, and the Navigation Bar, which allows you to explore through the task and the at present opened class document.
Require a couple of moments to concentrate on the screen. It will seem OK once you begin making an Android application with Java.
Since you comprehend the nuts and bolts of Android Studio, the time has come to at last make your first Java Android application.
JAVA Activity:
Presently, assuming you take a gander at the left half of your screen, you will see two organizers. One of them holds your application's code and is named after the title of your undertaking. For this situation, it would be MyFirstAndroidApp. The other organizer contains Gradle Scripts, which is a free device Android Studio uses to transform your application's code into .apk documents.
To begin with, you snap to open the MyFirstAndroidApp organizer and access the code of your application. Then, at that point, you click on the application organizer. This has three envelopes which hold various components of your task: shows, java, and res.
To begin, select res, which contains a record called activity_main.xml. Tapping on this document will permit you to get to the format of your primary Activity. On screen, it will resemble this:
DISPLAY HELLO WORLD CODES CREATE LINEAR LAYOUT Create or Update the template layout, Relative Layout to the following Code. ===>>src/main/res/layout/ activity_home.xml <LinearLayout android:orientation="vertical" android:layout_height="match_parent" android:layout_width="match_parent" > <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor=" @android:color/black" android:textSize="50sp" android:text="@string/hello_world"/> </LinearLayout> CREATE ACTIVITY Create or Update the template java Class. ==>> src/main/java/package-name/ HomeActivity.java Change ActionBarActivity to Activity for extended class for java class HomeActivity public class HomeActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCr...
FIRST ANDROID APP CODING ANDROID APP FOODCOURTS NOW I M GOING TO START APP AND CREATE FIRST ACTIVITY AND THE NAME IS HOME.ACTIVITY AND THE ALL THE STEPS IS OVER HERE. Create Linear Layout for Home Activity Create Relative Layout & set Attributes Create Action Bar via Relative Layout Understand Design Basics for Action Bar Image Button & Its Attributes Handling Click Event Add Comments CREATE LAYOUT : ( activity_home.xml ) CREATE ACTION BAR <RelativeLayout android:layout_height="56dp" android:layout_width="fill_parent" android:background="#7D26CD" android:layout_margin="1dp"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/textView" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:textColor="#FFFFF0" android:textS...
Comments
Post a Comment