Jul 19, 2015
ADEL AL-JAFFAN
ENAS AL-SAEEK
Android Training Workshop 2014
What is Android ?
What is Android?
Android is a “ open source ” software and
Google releases the code under the Apache
License. Android is a based on Linux the
operating system with a worldwide Smartphone during
the third quarter of 2013 with there were 11,869 different
models of Android device...
From entertainment and games, to organization and work based
solutions, there is a need for huge number of developers who
provide them. As per estimation this numbers is close to a few
millions.
Why Android?
There's no other software quite like Android.
Google engineered Android, and Google’s own apps run best on it.
And with millions of apps, games, songs, and videos on Google Play,
Android is great for fun, and for getting things done.
Android devices come in all kinds of sizes, with all sorts of features,
and at all sorts of prices. Each version of Android is named after a dessert,
and the most recent version of Android is ”KitKAT “
With Android, you’re in control of your mobile experience .
ANDROID
• Adel Al-jaffan 4th year
• Network engineering
• F.I.T.E
• Syria - Damascus University
ANDROID HISTORY
Android Versions ?
Android Versions ?
Alpha (1.0)
Beta (1.1)
Cupcake (1.5)
Donut (1.6)
Eclair (2.0–2.1)
Froyo (2.2–2.2.3)
Gingerbread (2.3–2.3.7)
Honeycomb (3.0–3.2.6)
Ice Cream Sandwich (4.0–4.0.4)
Jelly Bean (4.1–4.3.1)
KitKat (4.4–4.4.4)
"L" release (developer preview)
Android is a Mobile Powerhouse
Android Technology Advantage
Android is for Free Open Source
Job Opportunities are more in Android compare to other technologies.
Demand is more and supply is less.
Android is a Google technology
Large number of applications.
Writing the applications in Android is very easy as it is based on JAVA
Open for customization – Manufacturing
Developers can earn money by uploading your Android-App into market.
Application Store (Google Play , 1market , ……).
Runs on more than millions of devices worldwide.
Android learning References
developer.android.com
www.androidHive.com
“ Wrox ” , “ PRESS ” & “ for Dummies” Books Series .
“ LYNDA “ & “ The New Boston ” Video Series .
More , more ………
Android learning References
Android learning References
Android learning References
Requirements
1) JAVA Development Kit “JDK”
2) Android Developer Tools “ADT” Bundle
OR Android Studio
3) PC with good speed :D or s/w deivces
First touch
First project
1) Create Android project .
2) Create Specific Emulator
3) Fire your hands :D
Source code :
Activity.Xml :
Make your first Emulator :
Window Android Virtual Device Manager
- customize your app with your smartphone !
- WAIT & RUN !!!
Make your first Emulator
Buttons : ( activity_main.xml )
[ properties ]
id = "button1"
text = "Button"
layout_marginRight = "107dp"
layout_marginTop = "160dp"
width = "450dp"
height = "320dp"
Components :
Components : Buttons : (Events)
1- Create “Button” Variable and
Initialize It “pointed to specific button on layout ”
2- use it !
in 2 ways !!!!
A)
OnClickListener :
{
a- setOnClickListener (override View class)
}
Components : Buttons : (Events)
OnClickListener
final Button button = (Button) findViewById (R.id.button1);
button.setOnClickListener ( new View.OnClickListener( ) {
public void onClick(View v) {
// Perform action on click
}
});
Components :
Components : 1 Buttons : ( not with OnClickListener )
2nd way :
< Button android : id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text= "Click here"
android:textSize= "30dip"
android:onClick = "MyClickMethod“
/>
Components : 2 Buttons : ( not with OnClickListener )
2nd way :
Toast : toast provides simple feedback about an
operation in a small popup. It only fills the amount
of space required for the message and the
current activity remains visible and interactive.
For example, navigating away from an email
before you send it triggers a "Draft saved" toast to
let you know that you can continue editing later.
Toasts automatically disappear after a timeout.
Toast :Toast provides simple feedback about an
operation in a small popup.
Toasts automatically disappear after a
timeout.
Toast :
int duration = Toast.LENGTH_SHORT ;
String text = “ hi hi ” ;
Toast toast = Toast.makeText( this, text , duration ) ;
toast.show();
final Button button = (Button) findViewById (R.id.button1);
button.setOnClickListener ( new View.OnClickListener( ) {
public void onClick(View v) {
Toast toast ;
toast = Toast.makeText( MainActivity.this, "text",Toast.LENGTH_LONG);
toast.show();
}
} ) ;
Components :
Toast :
What about customization Toat ?
- Making colorful text ?
- Changing position of toast ?
- ……. Etc ?
Components : 3 , 4
textview : like label in c#
Edittext : like TextBox in c#
Simple Calculator App :
A lot of Steps ! :D