0% found this document useful (0 votes)
65 views19 pages

Intent & Layout in Android Studio: Y.hari

The document discusses Android intents and activity lifecycles. It explains that intents are objects that provide runtime binding between app components like activities. Intents represent an app's intent to perform an action, and are commonly used to start new activities. The document also covers using different layouts like linear, relative, and web views in activities, and providing resources for different screen sizes. It includes an example of creating multiple activities and using a web view to display a link.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views19 pages

Intent & Layout in Android Studio: Y.hari

The document discusses Android intents and activity lifecycles. It explains that intents are objects that provide runtime binding between app components like activities. Intents represent an app's intent to perform an action, and are commonly used to start new activities. The document also covers using different layouts like linear, relative, and web views in activities, and providing resources for different screen sizes. It includes an example of creating multiple activities and using a web view to display a link.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Intent & Layout in

Android Studio
y.hari
Activity Lifecycle
What is Intent?
• An Intent is an object that provides runtime binding between separate
components (such as two activities).

• The Intent represents an app’s "intent to do


something."
• You can use intents for a wide variety of tasks, but most often they’re used
to start another activity.
How to describe?

If you have multiple Screen in your app


how you communicate between screen
(Activity)??

If you want to access something else more


than the screen (e.g. Link to url, open
browser, etc) how to do it?
More about resource
• Layout

Linear Layout Relative Layout Web View


More about layout
• In every layout you can combine many layout/view in between

List View Grid View


Example of merging layout
Resource folder

320, for devices with screen


configurations such as:
240x320 ldpi (QVGA handset)
320x480 mdpi (handset)
480x800 hdpi (high density
handset)
480, for screens such as 480x800 mdpi
(tablet/handset).
600, for screens such as 600x1024
mdpi (7" tablet).
720, for screens such as 720x1280
mdpi (10" tablet).
To change the icon?
• In android studio

• File  New  Image Asset

• Replace the icon with desirable icon.


We want to make some apps to promote a TAXI
The apps must provide basic information
Case Studies Provide the call number
Provide the link to the web
Create layout
Activity 2
Create activity?
File  new  activity  blank activity
Or right click new
Activity 3
• Add new activity and add a web view widgets
Code

Name of the
activity
Code for calling a web
Permission
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />

Permission must
inside manifest tag
BUT outside any
other tag.
Homework
• Please create a simple application to Describe WHO YOU ARE!

• As simple as show your link to twitter or Facebook.

• Make a phone call

• Describe your hobbies and your preferred future spouse? Maybe.. Or


whatever you want the other to know you!
Problem??

You might also like