SlideShare una empresa de Scribd logo
1 de 20
Application Development
Overview on Android OS
Kanak & Pankaj
Overview/Design Guidelines
• A Mobile Operating System
• Uses a modified version of the Linux kernel
• Allows developers to write code in java language
• Third party application can be built using java and
android framework
Android 2.1 & Above
With
Eclipse IDE
Overview/Design Guidelines
What's in an App
Starting with the Project
Layouts & Screen Sizes
• FrameLayout
Layout that acts as a view frame to display a single object.
• LinearLayout
A layout that organizes its children into a single horizontal or vertical row. It creates
a scrollbar if the length of the window exceeds the length of the screen.
• RelativeLayout
Enables you to specify the location of child objects relative to each other (child A
to the left of child B) or to the parent (aligned to the top of the parent).
• ListView
Displays a scrolling single column list.
Common Layouts
• ScrollView
A vertically scrolling column of elements. Spinner Displays a single item at a time
from a bound list, inside a one-row textbox. Rather like a one-row
• TabHost
It provides a tab selection list that monitors clicks and enables the application to
change the screen whenever a tab is clicked.
• TableLayout
A tabular layout with an arbitrary number of rows and columns, each cell holding
the widget of your choice. The rows resize to fit the largest column. The cell
borders are not visible.
Layouts & Screen Sizes
Common Layouts
Layouts & Screen Sizes
Screen Sizes
Android runs on a variety of devices that offer different
screen sizes and densities
• xlarge screens are at least 960dp x 720dp
• large screens are at least 640dp x 480dp
• normal screens are at least 470dp x 320dp
• small screens are at least 426dp x 320dp
To support multiple screen size
• Explicitly declare in the manifest which screen sizes your application
supports
• Provide different layouts for different screen sizes
• Provide different bitmap drawables for different screen densities
Layouts & Screen Sizes
Screen Sizes
Manifest parameters for Screen sizes
<supports-screens android:resizeable=["true"| "false"]
android:smallScreens=["true" | "false"]
android:normalScreens=["true" | "false"]
android:largeScreens=["true" | "false"]
android:xlargeScreens=["true" | "false"]
android:anyDensity=["true" | "false"]
android:requiresSmallestWidthDp="integer"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>
Challenges faced while building
Naukri App
• Installing SDK for different Version of Android
• Choosing right IDE for development
• Using Spinner to choose value from the dropdown on runtime and from
set of array
• Calling spinner on clicking ImageView
• Choosing right layout to build XML
• Optimizing layout and making it re-usable
• Saving preferences
• Implementing multiple clicks on single activity
• Calling multiple activity for result on single activity
• Creating complete view on runtime
• Finishing activities correctly
Setting Up an Activity to set
background image and music
Background can contain image as well as music. Their time out can be handled
using simple threads in java.
Permissions Required –
<uses-permission android:name="android.permission.SET_WALLPAPER"></uses-
permission>
Setting up the Content View –
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.amazing);
}
Introduction to Media Player and Sound Pool –
MediaPlayer theSong = MediaPlayer.create(this, R.raw.uninvited);
theSong.start();
theSong.release();
Setting Up an Activity to set
background image and music
On pause Activity –
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
//theSong.stop(); // ---- this is same as Mediaplayer.release() the only
differnece is release method releases the other objects related to it and stop
method abruptly stops the object
theSong.release();
finish();
}
Creating a LIST/MENU and referencing
the selected Item
Extending ListActivity instead of Activity
Setting List –
ArrayAdapter<String> adapter = new ArrayAdapter<String>(MenuApp.this,
android.R.layout.simple_list_item_1, classes);
setListAdapter(adapter);
OnListItemClick()
Setting MenuKey –
MenuInflater blowUp = getMenuInflater();
blowUp.inflate(R.menu.cool_menu, menu);
OnOptionsItemSelected()
Setting Up buttons and text views
Button add = (Button) findViewById(R.id.bAdd);
Button sub = (Button) findViewById(R.id.bSub);
TextView display = (TextView) findViewById(R.id.tvDisplay);
Setting onClickListeners() for button clicks –
add.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
counter++;
display.setText("Your Total is: " + counter);
//display.setText(Integer.toString(counter));
}
});
Setting Up buttons and text views
sub.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
counter--;
display.setText("Your total is : " + counter);
}
});
SETTING UP A FORM WITH EDITBOXES
AND TOGGLE BUTTON AND
SIMPLE BUTTONS
final ToggleButton passTog = (ToggleButton) findViewById(R.id.tbPassword);
final EditText Name = (EditText) findViewById(R.id.etName);
final EditText MobNum = (EditText) findViewById(R.id.etMobileNumber);
final EditText EmailId = (EditText) findViewById(R.id.etEmailID);
final EditText Password = (EditText) findViewById(R.id.etPassword);
SETTING UP A FORM WITH EDITBOXES AND
TOGGLE BUTTON AND SIMPLE BUTTONS
Setting the input type for password field on the basis of toggle button-
passTog.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
if(passTog.isChecked()){
Password.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);
}else{
Password.setInputType(InputType.TYPE_CLASS_TEXT);
}
}
});
SETTING UP A FORM WITH EDITBOXES AND
TOGGLE BUTTON AND SIMPLE BUTTONS
Setting Alert Boxes –
new AlertDialog.Builder(TextActs.this)
.setMessage("Please fill in the valid email address,
mobile number and password should be minimum 6 characters long")
.setTitle("Validation Error")
.setCancelable(true)
.setNeutralButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton){}
})
.show();
SENDING AN EMAIL FROM APPLICATION
Permission Required –
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Setting Up Email intent –
String emailaddress[] = { emailAdd };
String message = “Some MEssage";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emailaddress);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "I hate you!");
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(emailIntent);
SAVING PREFERENCES
Preferences in Androids are like cookies on browsers which are saved in
the phone memory and can be accessed any time during the application.
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference android:title="Edit Text”android:key="name"
android:summary="Enter your name” />
<CheckBoxPreference android:title="Music” android:defaultValue="true"
android:key="checkbox” android:summary="for the start screen">
</CheckBoxPreference>
<ListPreference android:title="list” android:key="list” android:summary="Choose from”
android:entries="@array/list” android:entryValues="@array/lValues"
></ListPreference>
</PreferenceScreen>
Questions/Comments
?

Más contenido relacionado

La actualidad más candente

Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Five android architecture
Five android architectureFive android architecture
Five android architectureTomislav Homan
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentRaman Pandey
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Android application-component
Android application-componentAndroid application-component
Android application-componentLy Haza
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & LayoutsVijay Rastogi
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structureVyara Georgieva
 
01 what is android
01 what is android01 what is android
01 what is androidC.o. Nieto
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfacesC.o. Nieto
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Android Tutorial
Android TutorialAndroid Tutorial
Android TutorialFun2Do Labs
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tabSiva Kumar reddy Vasipally
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsiaMichael Angelo Rivera
 

La actualidad más candente (20)

Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Five android architecture
Five android architectureFive android architecture
Five android architecture
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
android layouts
android layoutsandroid layouts
android layouts
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
Training android
Training androidTraining android
Training android
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
 
01 what is android
01 what is android01 what is android
01 what is android
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Android components
Android componentsAndroid components
Android components
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tab
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 

Similar a Application Development - Overview on Android OS

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgetsSiva Kumar reddy Vasipally
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material DesignYasin Yildirim
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
 
Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxABHIKKUMARDE
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringShivanshSeth6
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2Vivek Bhusal
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design Rakesh Jha
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentanistar sung
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfacesShih-Hsiang Lin
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developersDarryl Bayliss
 

Similar a Application Development - Overview on Android OS (20)

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
 
Android
AndroidAndroid
Android
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptx
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_Engineering
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design
 
Android classes in mumbai
Android classes in mumbaiAndroid classes in mumbai
Android classes in mumbai
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Android programming basics
Android programming basicsAndroid programming basics
Android programming basics
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
 
Chapter 5 - Layouts
Chapter 5 - LayoutsChapter 5 - Layouts
Chapter 5 - Layouts
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developers
 

Último

Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptxAsmae Rabhi
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxgalaxypingy
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 

Último (20)

Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 

Application Development - Overview on Android OS

  • 1. Application Development Overview on Android OS Kanak & Pankaj
  • 2. Overview/Design Guidelines • A Mobile Operating System • Uses a modified version of the Linux kernel • Allows developers to write code in java language • Third party application can be built using java and android framework Android 2.1 & Above With Eclipse IDE
  • 5. Layouts & Screen Sizes • FrameLayout Layout that acts as a view frame to display a single object. • LinearLayout A layout that organizes its children into a single horizontal or vertical row. It creates a scrollbar if the length of the window exceeds the length of the screen. • RelativeLayout Enables you to specify the location of child objects relative to each other (child A to the left of child B) or to the parent (aligned to the top of the parent). • ListView Displays a scrolling single column list. Common Layouts
  • 6. • ScrollView A vertically scrolling column of elements. Spinner Displays a single item at a time from a bound list, inside a one-row textbox. Rather like a one-row • TabHost It provides a tab selection list that monitors clicks and enables the application to change the screen whenever a tab is clicked. • TableLayout A tabular layout with an arbitrary number of rows and columns, each cell holding the widget of your choice. The rows resize to fit the largest column. The cell borders are not visible. Layouts & Screen Sizes Common Layouts
  • 7. Layouts & Screen Sizes Screen Sizes Android runs on a variety of devices that offer different screen sizes and densities • xlarge screens are at least 960dp x 720dp • large screens are at least 640dp x 480dp • normal screens are at least 470dp x 320dp • small screens are at least 426dp x 320dp To support multiple screen size • Explicitly declare in the manifest which screen sizes your application supports • Provide different layouts for different screen sizes • Provide different bitmap drawables for different screen densities
  • 8. Layouts & Screen Sizes Screen Sizes Manifest parameters for Screen sizes <supports-screens android:resizeable=["true"| "false"] android:smallScreens=["true" | "false"] android:normalScreens=["true" | "false"] android:largeScreens=["true" | "false"] android:xlargeScreens=["true" | "false"] android:anyDensity=["true" | "false"] android:requiresSmallestWidthDp="integer" android:compatibleWidthLimitDp="integer" android:largestWidthLimitDp="integer"/>
  • 9. Challenges faced while building Naukri App • Installing SDK for different Version of Android • Choosing right IDE for development • Using Spinner to choose value from the dropdown on runtime and from set of array • Calling spinner on clicking ImageView • Choosing right layout to build XML • Optimizing layout and making it re-usable • Saving preferences • Implementing multiple clicks on single activity • Calling multiple activity for result on single activity • Creating complete view on runtime • Finishing activities correctly
  • 10. Setting Up an Activity to set background image and music Background can contain image as well as music. Their time out can be handled using simple threads in java. Permissions Required – <uses-permission android:name="android.permission.SET_WALLPAPER"></uses- permission> Setting up the Content View – protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.amazing); } Introduction to Media Player and Sound Pool – MediaPlayer theSong = MediaPlayer.create(this, R.raw.uninvited); theSong.start(); theSong.release();
  • 11. Setting Up an Activity to set background image and music On pause Activity – @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); //theSong.stop(); // ---- this is same as Mediaplayer.release() the only differnece is release method releases the other objects related to it and stop method abruptly stops the object theSong.release(); finish(); }
  • 12. Creating a LIST/MENU and referencing the selected Item Extending ListActivity instead of Activity Setting List – ArrayAdapter<String> adapter = new ArrayAdapter<String>(MenuApp.this, android.R.layout.simple_list_item_1, classes); setListAdapter(adapter); OnListItemClick() Setting MenuKey – MenuInflater blowUp = getMenuInflater(); blowUp.inflate(R.menu.cool_menu, menu); OnOptionsItemSelected()
  • 13. Setting Up buttons and text views Button add = (Button) findViewById(R.id.bAdd); Button sub = (Button) findViewById(R.id.bSub); TextView display = (TextView) findViewById(R.id.tvDisplay); Setting onClickListeners() for button clicks – add.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub counter++; display.setText("Your Total is: " + counter); //display.setText(Integer.toString(counter)); } });
  • 14. Setting Up buttons and text views sub.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub counter--; display.setText("Your total is : " + counter); } });
  • 15. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS final ToggleButton passTog = (ToggleButton) findViewById(R.id.tbPassword); final EditText Name = (EditText) findViewById(R.id.etName); final EditText MobNum = (EditText) findViewById(R.id.etMobileNumber); final EditText EmailId = (EditText) findViewById(R.id.etEmailID); final EditText Password = (EditText) findViewById(R.id.etPassword);
  • 16. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS Setting the input type for password field on the basis of toggle button- passTog.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub if(passTog.isChecked()){ Password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); }else{ Password.setInputType(InputType.TYPE_CLASS_TEXT); } } });
  • 17. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS Setting Alert Boxes – new AlertDialog.Builder(TextActs.this) .setMessage("Please fill in the valid email address, mobile number and password should be minimum 6 characters long") .setTitle("Validation Error") .setCancelable(true) .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton){} }) .show();
  • 18. SENDING AN EMAIL FROM APPLICATION Permission Required – <uses-permission android:name="android.permission.INTERNET"></uses-permission> Setting Up Email intent – String emailaddress[] = { emailAdd }; String message = “Some MEssage"; Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emailaddress); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "I hate you!"); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message); startActivity(emailIntent);
  • 19. SAVING PREFERENCES Preferences in Androids are like cookies on browsers which are saved in the phone memory and can be accessed any time during the application. <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <EditTextPreference android:title="Edit Text”android:key="name" android:summary="Enter your name” /> <CheckBoxPreference android:title="Music” android:defaultValue="true" android:key="checkbox” android:summary="for the start screen"> </CheckBoxPreference> <ListPreference android:title="list” android:key="list” android:summary="Choose from” android:entries="@array/list” android:entryValues="@array/lValues" ></ListPreference> </PreferenceScreen>