Android Intent Tutorial 2

22
Android Application Development Tutorial 2

description

Android Intent programming, launch new activity on button click event, custom button, layout background changes, manifest.xml configuration.

Transcript of Android Intent Tutorial 2

Page 1: Android Intent Tutorial 2

Android Application DevelopmentTutorial 2

Page 2: Android Intent Tutorial 2

Intent Programming

Page 3: Android Intent Tutorial 2

Let’s start New Project

Page 4: Android Intent Tutorial 2

Fill the project details

Page 5: Android Intent Tutorial 2

Let’s create Custom Button

Page 6: Android Intent Tutorial 2

Create new drawable file

Page 7: Android Intent Tutorial 2

Complete the details

Page 8: Android Intent Tutorial 2

Button background

Page 9: Android Intent Tutorial 2

Layout background color

Page 10: Android Intent Tutorial 2

Main Activity Layout

Page 11: Android Intent Tutorial 2

Add a new string in string.xml

Page 12: Android Intent Tutorial 2

String name and value

Page 13: Android Intent Tutorial 2

Let’s create second layout

Page 14: Android Intent Tutorial 2

Second Activity Layout

Page 15: Android Intent Tutorial 2

Create a new java class

Page 16: Android Intent Tutorial 2

Naming the .java file

Page 17: Android Intent Tutorial 2

Changes in MainActivity & SecondActivity

Page 18: Android Intent Tutorial 2

Finally register new activity in manifest file

Page 19: Android Intent Tutorial 2

Browse for class name

Page 20: Android Intent Tutorial 2

AndroidManifest.xml

Page 21: Android Intent Tutorial 2

Run the project on AVD

Page 22: Android Intent Tutorial 2