- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
In this lecture we are going to develop our first android app i-e "Hello world".First Open you android studio by clicking on the home button that appears on the left bottom of your computer screen.
After that go to your menu tab of android studio and click on the file,then click on new and select new project.Then follow the steps and select empty activity,android version and give name to your activity and click finish.After that wait for some time until your project build successfully.There will be two tabs on the screen one is "XML" and the other will be "Java" activity.In "XML" you design your layout and in "Java" activity you write your code.In XML activity take a text-view,give an id to it.
Code to Develop your first app using Android Studio
Code to Develop your first app using Android Studio
That's all done for XML activity.Now it's time to write some java code.<TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" android:textSize="30dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />
package com.example.sohailmustafa.helloworld; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class MainActivity extends AppCompatActivity { TextView textView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView=(TextView) findViewById(R.id.textView); } }
This is all done,Now run your app by following the procedure
Click on the run button select your device, you have developed your first app using android studio.In our next lecture we will learn how
to change the text on button click.If you have any difficulty in this lecture don't hesitate
to ask.God bless you all,have a good day.
HAPPY CODING
Develop your first app using Android Studio
android studio tutorial
build your first android app
build your first app android studio
create your first android app
First android app
my first android app
- Get link
- X
- Other Apps
Comments
Awesone tutorial.You are a life saver.waiting for next lecture impatiently
ReplyDeletethanks and stay tuned for more lectures
Delete