+ All Categories
Home > Technology > Introduction to Android Programming

Introduction to Android Programming

Date post: 14-Feb-2017
Category:
Upload: collaboration-technologies
View: 13 times
Download: 2 times
Share this document with a friend
11
Introduction to Android Programming www.collaborationtech.co.in Bengaluru INDIA Presentation By Ramananda M.S Rao
Transcript
Page 1: Introduction to Android Programming

Introduction to Android Programming

www.collaborationtech.co.inBengaluru INDIA

Presentation By Ramananda M.S Rao

Page 2: Introduction to Android Programming

ContentContentCore JavaXML TechnologiesIntroduction to AndroidStackGet StartedProject StructureUI – Layouts and ViewsEvents, Dialogs and MessagesResourcesPreferences and FilesApplication Components and Life CycleContent ProvidersDatabase StorageMultimediaGraphics and AnimationNetworkingThreadsNotificationsDeploymentDebugging ApplicationsSecurity FrameworkSearch ServiceLocation ServiceProjectAbout Us

www.collaborationtech.co.in

Page 3: Introduction to Android Programming

Introduction Android is an open source and Linux-based Operating

System for mobile devices such as smartphones and tablet computers.

Android offers a unified approach to application development for mobile devices which means developers need only develop for Android, and their applications should be able to run on different devices powered by Android.

Multiple companies producing Android phones like Samsung, HTC, LG, Motorola,LAVA and many others.

www.collaborationtech.co.in

Page 4: Introduction to Android Programming

Project Structure

www.collaborationtech.co.in

Page 5: Introduction to Android Programming

Android Architecture

www.collaborationtech.co.in

Page 6: Introduction to Android Programming

Get StartedSrccomexamplehelloworldMainActivity.java

package com.example.helloworld;import android.support.v7.app.ActionBarActivity;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;public class MainActivity extends ActionBarActivity {@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }}

www.collaborationtech.co.in

Page 7: Introduction to Android Programming

Get StartedResLayout activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:background="@drawable/im_1" tools:context="com.example.helloworld.MainActivity" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" android:textColor="@color/titlecolor" android:textSize="20sp" /> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_below="@+id/textView1" android:layout_marginTop="16dp" android:text="Welcome to Collaboration Technologies" android:textAppearance="?android:attr/textAppearanceSmall" /></RelativeLayout>

www.collaborationtech.co.in

Page 8: Introduction to Android Programming

Get StartedResMenu main.xml<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.helloworld.MainActivity" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:title="@string/action_settings" app:showAsAction="never"/></menu>

www.collaborationtech.co.in

Page 9: Introduction to Android Programming

Get StartedResvaluesstrings.xml<?xml version="1.0" encoding="utf-8"?><resources><string name="app_name">Hello World</string> <string name="hello_world">Collaboration Technologies</string> <string name="action_settings">Settings</string></resources>Running the Application :Let's try to run our Hello World! application we just created. I assume you had created your AVD while doing environment setup. To run the app from Eclipse, open one of your project's activity files and click Run icon from the toolbar. Eclipse installs the app on your AVD and starts it and if everything is fine with your setup and application, it will display the output Emulator window.

www.collaborationtech.co.in

Page 10: Introduction to Android Programming

Follow us on SocialFacebook: https://www.facebook.com/collaborationtechnologies/Twitter : https://twitter.com/collaboration09Google Plus : https://plus.google.com/100704494006819853579LinkedIn : https://www.linkedin.com/in/ramananda-rao-a2012545Instagram : https://instagram.com/collaborationtechnologiesYouTube : https://www.youtube.com/channel/UCm9nK56LRbWSqcYWbzs8CUgSkype : facebook:ramananda.rao.7WhatsApp : +91 9886272445

www.collaborationtech.co.in

THANK YOU

Page 11: Introduction to Android Programming

About Us


Recommended