SlideShare a Scribd company logo
1 of 5
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
Android interview questions
1.Explain the life cycle of an activity, in android?
onCreate-> onStart() -> onResume() -> onPause() -> onStop() -
> onDestroy()
2.What is the difference between px, dp, dip, and dpi ?
px - pixels, dp - density independentpixels, dip - density
independentpixels, sp - scale independentpixels
3.What is android:gravityattribute in the view tag?
it is to align the view content either right/top/bottom/center
with in that view.
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
4.What is the difference between linearlayout and relative
layout?
linearlayout - arranges element in either vertical or horizontal
fashion.
Relative layout- arranges elements in relative to each other.
5.How to killan activity?
i. finish()
ii.finishActivity(intrequestcode)
6.what is the life cycle of an activity in case of configuration
change or orientationchange?
a)onPause() -> onSaveInstanceState()-> onCreate() -> onStart()
-> onRestoreInstanceState() -> onResume()
b)onPause() -> onSaveInstanceState()-> onStop() -> onCreate()
-> onStart() -> onRestoreInstanceState() -> onResume()
c)onPause() -> onSaveInstanceState() -> onStop() ->
onDestroy()->onCreate() -> onStart() ->
onRestoreInstanceState() -> onResume()
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
7.How many kinds of linearlayoutsare there in android?
horizontal& vertical linearlayout
8.What is Bundle?What does it contain in onCreate() of your
activity?
Bundle containprevious savedInstantceState
9.How to get image from gallery, in android?
Intent in = new Intent();
in.setType("image/*");
in.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(in, 0);
10.Name some list adapters?
array adapter, cursor adapter, expandablelist adapter, etc..
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
11.When an activity is in stopped state, is it still in memory or
not?
when onStop() is called,then activity is still in memory and all
its states and variables are intact.
12.How to pass data between activities? let’s say pass user id,
city, and password to next activity and displayit.
Intent in = new Intent();
in.setAction("ACTION");//this should match with other activity
intent-filter
in.putExtra("uid","kalis");
in.putExtra("city","Chennai");
in.putExtra("pw","androidtips");
13.What is activity in android?
Each screen in android,with which user interacts is called as an
activity.
14.What is a context in android?
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
a).It is an interface to global informationof an application.
b).contexts are generally used to create a new componentsor
objects, like views.
c).Contexts are also used to start an activity, or service or a
receiver.
d).There are two types of contexts, activity context(this) and
applicationcontext.You can obtainapplication contextby
getApplicationContext()method.
15.What is pendingintent in android?
An intent which will be fired or triggered at future pointof time
by some one else (esp Alarm Manager or NotificationManager)
on behalf of your application.
http://www.enrollmytraining.com/android-online-training/

More Related Content

Similar to Android interview questions

Programming for Financial Strategies
Programming for Financial StrategiesProgramming for Financial Strategies
Programming for Financial Strategies
Prabhakar Verma
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.
Mohammad Shaker
 

Similar to Android interview questions (20)

Android Oreo
Android OreoAndroid Oreo
Android Oreo
 
08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
 
Programming for Financial Strategies
Programming for Financial StrategiesProgramming for Financial Strategies
Programming for Financial Strategies
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom Adapter
 
Android 3
Android 3Android 3
Android 3
 
Getting the Magic on Android Tablets
Getting the Magic on Android TabletsGetting the Magic on Android Tablets
Getting the Magic on Android Tablets
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
Ruby conf2012
Ruby conf2012Ruby conf2012
Ruby conf2012
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Unit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docUnit5 Mobile Application Development.doc
Unit5 Mobile Application Development.doc
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
Data Binding
Data BindingData Binding
Data Binding
 
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
 

More from enrollmy training

More from enrollmy training (10)

Sap HCI online training
Sap HCI online trainingSap HCI online training
Sap HCI online training
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
 
Informatica mdm online training
Informatica  mdm online trainingInformatica  mdm online training
Informatica mdm online training
 
Devops interview questions
Devops interview questionsDevops interview questions
Devops interview questions
 
Pentaho interview question and answers
Pentaho interview question and answersPentaho interview question and answers
Pentaho interview question and answers
 
Pentaho online training
Pentaho online trainingPentaho online training
Pentaho online training
 
Sap ppm online training
Sap ppm online trainingSap ppm online training
Sap ppm online training
 
Business analyst resume
Business analyst resumeBusiness analyst resume
Business analyst resume
 
Business analyst resume
Business analyst resumeBusiness analyst resume
Business analyst resume
 
Oracle dba online training in india usa canada
Oracle dba online training in india usa canadaOracle dba online training in india usa canada
Oracle dba online training in india usa canada
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Android interview questions

  • 1. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training Android interview questions 1.Explain the life cycle of an activity, in android? onCreate-> onStart() -> onResume() -> onPause() -> onStop() - > onDestroy() 2.What is the difference between px, dp, dip, and dpi ? px - pixels, dp - density independentpixels, dip - density independentpixels, sp - scale independentpixels 3.What is android:gravityattribute in the view tag? it is to align the view content either right/top/bottom/center with in that view.
  • 2. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 4.What is the difference between linearlayout and relative layout? linearlayout - arranges element in either vertical or horizontal fashion. Relative layout- arranges elements in relative to each other. 5.How to killan activity? i. finish() ii.finishActivity(intrequestcode) 6.what is the life cycle of an activity in case of configuration change or orientationchange? a)onPause() -> onSaveInstanceState()-> onCreate() -> onStart() -> onRestoreInstanceState() -> onResume() b)onPause() -> onSaveInstanceState()-> onStop() -> onCreate() -> onStart() -> onRestoreInstanceState() -> onResume() c)onPause() -> onSaveInstanceState() -> onStop() -> onDestroy()->onCreate() -> onStart() -> onRestoreInstanceState() -> onResume()
  • 3. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 7.How many kinds of linearlayoutsare there in android? horizontal& vertical linearlayout 8.What is Bundle?What does it contain in onCreate() of your activity? Bundle containprevious savedInstantceState 9.How to get image from gallery, in android? Intent in = new Intent(); in.setType("image/*"); in.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(in, 0); 10.Name some list adapters? array adapter, cursor adapter, expandablelist adapter, etc..
  • 4. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 11.When an activity is in stopped state, is it still in memory or not? when onStop() is called,then activity is still in memory and all its states and variables are intact. 12.How to pass data between activities? let’s say pass user id, city, and password to next activity and displayit. Intent in = new Intent(); in.setAction("ACTION");//this should match with other activity intent-filter in.putExtra("uid","kalis"); in.putExtra("city","Chennai"); in.putExtra("pw","androidtips"); 13.What is activity in android? Each screen in android,with which user interacts is called as an activity. 14.What is a context in android?
  • 5. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training a).It is an interface to global informationof an application. b).contexts are generally used to create a new componentsor objects, like views. c).Contexts are also used to start an activity, or service or a receiver. d).There are two types of contexts, activity context(this) and applicationcontext.You can obtainapplication contextby getApplicationContext()method. 15.What is pendingintent in android? An intent which will be fired or triggered at future pointof time by some one else (esp Alarm Manager or NotificationManager) on behalf of your application. http://www.enrollmytraining.com/android-online-training/