SlideShare a Scribd company logo
1 of 20
ANDROID APPLICATION
DEVELOPMENT
Submitted By-
Mayank Bhatt
SubmittedTo-
Ms. Niharika Joshi
Content
• Views
• Using views
• View groups
• Layout
• Common layout classes
• Event handling
• Activity
• Implementing activities
• Intent
• Activity states and App visibility
Views
• Views are android’s basic user interface building blocks
• Base class for widgets
• Responsible for drawing and event handling
UsingViews
• Set properties
• Set focus
• Set up listeners
• Set visibility
View groups
• Contains other views.
• Base class for layouts and view containers
• This class also defines theViewGroup.LayoutParams class
Layout
• Specific types of view groups
• Subclasses of view groups
• Contains child views
Common layout classes
• Constraint layout
• Linear layout
• Relative layout
• Table layout
• Grid layout
Event handling
• In XML:
• Attach handler to view in layout
• android: onClick=“ShowToast”
• Implementing handler in activity
public void showToast(View view){
String msg=“Hello”;
Toast toast =Toast.makeText(this,msg,duration)
toast.Show();
}
• Setting click handlers in Java
final Button button = (Button)findViewById(R.id.button_id);
button.SetOnClickListener(newView.OnClickListener(){
public void OnClick(View v){
String msg=“Hello !!!”;
Toast toast =Toast.makeText(this,msg,duration);
toast.show();
}
})
Activity
• An activity is an application component
• An activity comprises of two things-
• Java file
• XML file
• It is a class with U.I.
Implementing new activities
1. Define layout in XML
2. Define JAVA class
1. extends AppCompatActivity
3. Connect Activity with layout
1. Set content view in onCreate()
4. Declare Activity in android manifest file
Activity states and App visibility
• Created
• Started
• Resume
• Paused
• Stopped
• Destroyed
Intent
• An intent is a description of an operation to be performed.
• An intent is an object used to request an operation from another app
component.
What can Intents do?
• Start activities
• Start services
• Deliver Broadcasts
Types Of Intents
• Explicit Intent
• These intents designate the target component by its name and they
are typically used for application-internal messages
• Implicit Intent
• These intents do not name a target and the field for the component
name is left blank.
Add a SlideTitle -
5

More Related Content

Similar to Android application development

Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentals
Goran Djonovic
 
Android activity intents
Android activity intentsAndroid activity intents
Android activity intents
perpetrotech
 
Unit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptxUnit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptx
ShantanuDharekar
 
Android activity
Android activityAndroid activity
Android activity
Krazy Koder
 
Android activity
Android activityAndroid activity
Android activity
Krazy Koder
 

Similar to Android application development (20)

Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentals
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.ppt
 
Android activity intents
Android activity intentsAndroid activity intents
Android activity intents
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptx
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Notes Unit3.pptx
Notes Unit3.pptxNotes Unit3.pptx
Notes Unit3.pptx
 
Android components
Android componentsAndroid components
Android components
 
1_Object Oriented Programming.pptx
1_Object Oriented Programming.pptx1_Object Oriented Programming.pptx
1_Object Oriented Programming.pptx
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
Client side modularization for modern web applications
Client side modularization for modern web applicationsClient side modularization for modern web applications
Client side modularization for modern web applications
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Ui 5
Ui   5Ui   5
Ui 5
 
Unit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptxUnit 5 Activity and Activity Life Cycle.pptx
Unit 5 Activity and Activity Life Cycle.pptx
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
Android activity
Android activityAndroid activity
Android activity
 
Android activity
Android activityAndroid activity
Android activity
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3
 
Android Insights - 1 [Intents]
Android Insights - 1 [Intents]Android Insights - 1 [Intents]
Android Insights - 1 [Intents]
 

More from Mayank Bhatt (7)

Android application development part2
Android application development part2Android application development part2
Android application development part2
 
Flickr
FlickrFlickr
Flickr
 
Javascript
JavascriptJavascript
Javascript
 
Templates in c++
Templates in c++Templates in c++
Templates in c++
 
Fibre optics cable
Fibre optics cableFibre optics cable
Fibre optics cable
 
Instruction set
Instruction setInstruction set
Instruction set
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 

Android application development

  • 1. ANDROID APPLICATION DEVELOPMENT Submitted By- Mayank Bhatt SubmittedTo- Ms. Niharika Joshi
  • 2. Content • Views • Using views • View groups • Layout • Common layout classes • Event handling • Activity • Implementing activities • Intent • Activity states and App visibility
  • 3. Views • Views are android’s basic user interface building blocks • Base class for widgets • Responsible for drawing and event handling
  • 4. UsingViews • Set properties • Set focus • Set up listeners • Set visibility
  • 5. View groups • Contains other views. • Base class for layouts and view containers • This class also defines theViewGroup.LayoutParams class
  • 6. Layout • Specific types of view groups • Subclasses of view groups • Contains child views
  • 7. Common layout classes • Constraint layout • Linear layout • Relative layout • Table layout • Grid layout
  • 8. Event handling • In XML: • Attach handler to view in layout • android: onClick=“ShowToast” • Implementing handler in activity public void showToast(View view){ String msg=“Hello”; Toast toast =Toast.makeText(this,msg,duration) toast.Show(); }
  • 9. • Setting click handlers in Java final Button button = (Button)findViewById(R.id.button_id); button.SetOnClickListener(newView.OnClickListener(){ public void OnClick(View v){ String msg=“Hello !!!”; Toast toast =Toast.makeText(this,msg,duration); toast.show(); } })
  • 10. Activity • An activity is an application component • An activity comprises of two things- • Java file • XML file • It is a class with U.I.
  • 11. Implementing new activities 1. Define layout in XML 2. Define JAVA class 1. extends AppCompatActivity 3. Connect Activity with layout 1. Set content view in onCreate() 4. Declare Activity in android manifest file
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Activity states and App visibility • Created • Started • Resume • Paused • Stopped • Destroyed
  • 17. Intent • An intent is a description of an operation to be performed. • An intent is an object used to request an operation from another app component.
  • 18. What can Intents do? • Start activities • Start services • Deliver Broadcasts
  • 19. Types Of Intents • Explicit Intent • These intents designate the target component by its name and they are typically used for application-internal messages • Implicit Intent • These intents do not name a target and the field for the component name is left blank.

Editor's Notes

  1. All of the views in a window are arranged in a single tree. You can add views either from code or by specifying a tree of views in one or more XML layout files. There are many specialized subclasses of views that act as controls or are capable of displaying text, images, or other content. Once you have created a tree of views, there are typically a few types of common operations you may wish to perform: Set properties: for example setting the text of a TextView. The available properties and the methods that set them will vary among the different subclasses of views. Note that properties that are known at build time can be set in the XML layout files. Set focus: The framework will handle moving focus in response to user input. To force focus to a specific view, call requestFocus(). Set up listeners: Views allow clients to set listeners that will be notified when something interesting happens to the view. For example, all views will let you set a listener to be notified when the view gains or loses focus. You can register such a listener using setOnFocusChangeListener(android.view.View.OnFocusChangeListener). Other view subclasses offer more specialized listeners. For example, a Button exposes a listener to notify clients when the button is clicked. Set visibility: You can hide or show views using setVisibility(int). Note: The Android framework is responsible for measuring, laying out and drawing views. You should not call methods that perform these actions on views yourself unless you are actually implementing a ViewGroup.
  2. Whatever you see on screen all the ui they all are presented by activity. It can be a complete window , floating window
  3. we create layout in layout folder which is inside res folder we need a java file which extends appcompatactivity we need to connect a XML file with java file that’s where onCreate method comes in
  4. not visible, visible, visible , partially invisible, hidden, gone from memory
  5. Intent is a class which is used to invoke all the android fundamental components(activities, services, broadcast receivers, content provider) except content provider.