Post on 06-May-2015
description
04/11/2023 KINU | Android Mobile BootCamp
Android Mobile Boot campKINU | TANZANIA
04/11/2023 KINU | Android Mobile BootCamp
Android Platform Overview
04/11/2023 KINU | Android Mobile BootCamp
Set Android Emulator
Not a Simulator!
04/11/2023 KINU | Android Mobile BootCamp
Create new Android project
04/11/2023 KINU | Android Mobile BootCamp
Android project layout
04/11/2023 KINU | Android Mobile BootCamp
Android Key Concepts and building blocks
04/11/2023 KINU | Android Mobile BootCamp
Activity Android Key Concepts
04/11/2023 KINU | Android Mobile BootCamp
Android Widgets Android Key Concepts
Button
TextView
EditText
ImageView
ImageButton
And many more…..
INPUT OUTPUT
04/11/2023 KINU | Android Mobile BootCamp
Android Intents Android Key Concepts
Intent about=new Intent(getApplicationContext(),About.class);startActivity(about);
SCREEN 1[ACTIVITY]
SCREEN 2[ACTIVITY]
provides runtime binding
04/11/2023 KINU | Android Mobile BootCamp
Android Intents Android Key Concepts
Intent intent = new Intent(this, DisplayMessageActivity.class);
Parameters
Context
The Class of the app component to which the system should deliver the Intent (in this case, the activity that should be started)
04/11/2023 KINU | Android Mobile BootCamp
Android Intents Android Key Concepts
Carry Collection of Data to another Activity
extras
putExtra
public void sendMessage(View view) { Intent intent = new Intent(this, DisplayMessageActivity.class); EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent);}
Receive Intent
Intent intent = getIntent();String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
04/11/2023 KINU | Android Mobile BootCamp
XML codesAndroid Key Concepts
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical" android:layout_width="fill_parent"android:layout_height="fill_parent"android:background="#008080">
04/11/2023 KINU | Android Mobile BootCamp
Android Manifest FileAndroid Key Concepts
Think of plane manifest!
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.randomname.costech" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/appicon" android:label="@string/app_name"> <activity android:name=".AppStartmenu" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
04/11/2023 KINU | Android Mobile BootCamp
Android Manifest FileAndroid Key Concepts
<activity android:name=".Startmenu"></activity><activity android:name=".About"></activity><activity android:name=".Help"></activity> </application> <uses-sdk android:minSdkVersion="8" /></manifest>
Think of plane manifest!
04/11/2023 KINU | Android Mobile BootCamp
Android layoutsAndroid Key Concepts
Linear Layout
Absolute layout
Frame layout
04/11/2023 KINU | Android Mobile BootCamp
Android Menus [options menu] Android Key Concepts
04/11/2023 KINU | Android Mobile BootCamp
Android Icons
Android Key Concepts
04/11/2023 KINU | Android Mobile BootCamp
Android App Deployment
Android Key Concepts
APK FILE
04/11/2023 KINU | Android Mobile BootCamp
1 Reference Android App
04/11/2023 KINU | Android Mobile BootCamp
Get your hands Dirty