Posts

Showing posts with the label Activities

Using Basic Activity (Java) - Android Studio

Image
In this tutorial we will learn how to use/create/add Basic Activity . We will use Java Language. Step 1: Create a New Project select "Basic Activity" OR Open Project & add Basic Activity File>New>Activity>Basic Activity Step 2: Done, your code will look like activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" tools:context= ".MainActivity" > <android.support.design.widget.AppBarLayout android:layout_width= "match_parent" android:layout_height= "wrap_content" android:theme= "@style/AppThem...

Using Basic Activity (Kotlin) - Android Studio

Image
In this tutorial we will learn how to use/create/add Basic Activity. We will use Kotlin Language. Step 1: Create a New Project select "Basic Activity" OR  Open Project & add Basic Activity File>New>Activity>Basic Activity Step 2: Done, your code will look like activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" tools:context= ".MainActivity" > <android.support.design.widget.AppBarLayout android:layout_width= "match_parent" android:layout_height= "wrap_content" android:theme= "@style/AppTheme....

First App in Android Studio (Kotlin) - Use Empty Activity

Image
How to create project in android studio using Kotlin? In this post we will learn how to create a project on Android Studio and run on android emulator step wise, You must have Android Studio installed properly... We will cover followings: ✔Create New Project ✔Kotlin Language ✔Use Empty Activity ✔Run Project on emulator ✔Print "Hello World" Step 1: Open Android Studio & Click "Start a new Android Studio Project". Step 2: Enter Application Name, Company Domain, Project Location, Check "Include Kotlin support" & Click "Next". Step 3: Select target API Level & Click "Next". Step 4: Choose Activity(Empty Activity) & Click "Next". Step 5: Enter Activity Name(MainActivity) & Click "Finish". Step 6: Code of MainActivity.kt package com.blogspot.devofandroid.myapplication import android.support.v7.app.AppCompatActivity import android.os.Bundle class ...

First App in Android Studio

Image
How to create project in android studio? In this post we will learn how to create a project on Android Studio and run on android emulator step wise, You must have Android Studio installed properly... We will cover followings: ✔Create New Project ✔Use Empty Activity ✔Run Project on emulator ✔Print "Hello World" Step 1: Open Android Studio & Click "Start a new Android Studio Project". Step 2: Enter Application Name, Company Domain, Project Location & Click "Next". Step 3: Select target API Level & Click "Next". Step 4: Choose Activity(Empty Activity) & Click "Next". Step 5: Enter Activity Name(MainActivity) & Click "Finish". Step 6:  Code of MainActivity.java package com . blogspot . devofandroid . myapplication ; import android.support.v7.app.AppCompatActivity ; import android.os.Bundle ; public class MainActivity extends AppCompatActivity { ...