SlideShare a Scribd company logo
by Eakapong Kattiya
UI Design
Monday, July 15, 13
Tabs
by Eakapong Kattiya
Monday, July 15, 13
Fixed Tabs : Movies ,Twitter
Fixed Tabs
- ต้องการเน้นให้ผู้ใช้เห็นข้อมูลหน้าอื่น ๆ
- ใช้เมื่อต้องสลับหน้าจอ(View) บ่อย ๆ
- จํานวน Top LevelView ไม่ควรเกิน 3-5
by Eakapong Kattiya
Monday, July 15, 13
Scrollable Tabs : Google Play Store
by Eakapong Kattiya
Monday, July 15, 13
Stacked Tabs :You Tube
by Eakapong Kattiya
Monday, July 15, 13
TabHost : Step 1 : activity_main.xml
by Eakapong Kattiya
Monday, July 15, 13
TabHost : Step 2 : MainActivity.java
public class MainActivity extends TabActivity {
	 @Override
	 protected void onCreate(Bundle savedInstanceState) {
	 	 super.onCreate(savedInstanceState);
	 	 setContentView(R.layout.activity_main);
	 	 TabHost mtabHost = getTabHost();
	 	 addTab1(mTabHost);
	 	 addTab2(mTabHost);
	 	 addTab3(mTabHost);
	 }
by Eakapong Kattiya
Monday, July 15, 13
TabHost : Step 3 : MainActivity.java
void addTab1(TabHost tabHost) {
	 	 // Tab for First
	 	 TabSpec tbFirst = tabHost.newTabSpec("Intent");
	 	
// setting Title and Icon for the Tab
	 	 tbFirst.setIndicator("Intent",null);
	 	 Intent firstIntent = new Intent(this, FirstActivity.class);
	 	 tbFirst.setContent(firstIntent);
	 	 // Adding TapSpec to tabHost
tabHost.addTab(tbFirst);
	 }
by Eakapong Kattiya
Monday, July 15, 13
TabHost : Step 4 : MainActivity.java
void addTab2(TabHost tabHost) {
	 	 // Tab for Second
	 	 TabSpec tbSecond = tabHost.newTabSpec("WebView");
	 	
// setting Title and Icon for the Tab
tbSecond.setIndicator("WebView", null);
	 	 Intent secondIntent = new Intent(this,SecondActivity.class);
	 	 tbSecond.setContent(secondIntent);
// Adding TapSpec to tabHost
	 	 tabHost.addTab(tbSecond);
	 }
by Eakapong Kattiya
Monday, July 15, 13
TabHost : Step 5 : MainActivity.java
void addTab3(TabHost tabHost) {
	 	 // Tab for Third
	 	 TabSpec tbThird = tabHost.newTabSpec("Third");
	 	
// setting Title and Icon for the Tab
tbThird.setIndicator(null,
	 	 	 	 getResources().getDrawable(R.drawable.ic_tab_third));
	 	 Intent thirdIntent = new Intent(this, ThirdActivity.class);
	 	 tbThird.setContent(thirdIntent);
// Adding TapSpec to tabHost
	 	 tabHost.addTab(tbThird);
	 }
by Eakapong Kattiya
Monday, July 15, 13
TabHost
by Eakapong Kattiya
Monday, July 15, 13
Lists
by Eakapong Kattiya
Monday, July 15, 13
ListView
* TabActivity is deprecated
* use fragment Activity instead
by Eakapong Kattiya
Monday, July 15, 13
Single Line List : simple_list_item_1
* TabActivity is deprecated
* use fragment Activity instead
android.R.layout.simple_list_item_1
by Eakapong Kattiya
Monday, July 15, 13
Single Line List : simple_list_item_1 : FirstActivity.java
public class FirstActivity extends Activity
implements OnItemClickListener{
	 @Override
	 protected void onCreate(Bundle savedInstanceState) {
	 	 super.onCreate(savedInstanceState);
	 	 setContentView(R.layout.activity_first);
	 	 initListView();
	 }
by Eakapong Kattiya
Monday, July 15, 13
Single Line List : simple_list_item_1 : FirstActivity.java
* TabActivity is deprecated
* use fragment Activity instead
private void initListView() {
	 	 // 1. Create listView object
	 	 ListView listView = (ListView) findViewById(R.id.listView1);
	 	 // 2. Create mArraylist object
	 	 String[] stringArray = new String[]{"Phone","SMS","EMAIL","CAMERA"};
	 	 // Alternative
	 	 // ArrayList<String> mArraylist = new ArrayList<String>();
	 	 // mArraylist.add("Item1");
	 	 // mArraylist.add("Item2");
	 	 // 3. Create arrayAdapter object
	 	 // first parameter = context of the activity
	 	 // second parameter = the type of list view
	 	 // third parameter = your array
	 	 ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>
(this,android.R.layout.simple_list_item_1, stringArray);
	 	 listView.setAdapter(arrayAdapter);
	 	 // 4. Add listView Listener
	 	 listView.setOnItemClickListener(this);
}
by Eakapong Kattiya
Monday, July 15, 13
Single Line List : simple_list_item_1 : FirstActivity.java
* TabActivity is deprecated
* use fragment Activity instead
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
	 	
String item = (String) arg0.getItemAtPosition(arg2);
	 	 Log.i("Click listView", item);
	 	 Toast.makeText(getApplicationContext(),
	 	 	 	 "Click listView " + item,
	 	 	 	 Toast.LENGTH_LONG).show();
	 }
by Eakapong Kattiya
Monday, July 15, 13
Single Line List : simple_list_item_1
by Eakapong Kattiya
Monday, July 15, 13
2 Line List : simple_list_item_2
android.R.layout.simple_list_item_2
by Eakapong Kattiya
TwoLineListItem
Monday, July 15, 13
2 Line List : simple_list_item_2 : SecondActivity.java
* TabActivity is deprecated
* use fragment Activity instead
public class SecondActivity extends Activity
	 	 	 	 	 	 implements OnItemClickListener{
	 @Override
	 protected void onCreate(Bundle savedInstanceState) {
	 	 super.onCreate(savedInstanceState);
	 	 setContentView(R.layout.activity_second);
	 	 initListView();
	 }
by Eakapong Kattiya
Monday, July 15, 13
2 Line List : simple_list_item_2 : SecondActivity.java
* TabActivity is deprecated
* use fragment Activity instead
private void initListView(){
	 	 ListView listView = (ListView) findViewById(R.id.listView1);
	 	 ArrayList<Item> items = new ArrayList<Item>();
	 	 Item item1 = new Item();
	 	 item1.setTitle("iBluecode");
	 	 item1.setDetail("http://www.ibluecode.com");
	 	 items.add(item1);
	 	 Item item2 = new Item();
	 	 item2.setTitle("Facebook");
	 	 item2.setDetail("http://www.facebook.com");
	 	 items.add(item2);
	 	
	 	 Item item3 = new Item();
	 	 item3.setTitle("Twitter");
	 	 item3.setDetail("http://www.twitter.com");
	 	 items.add(item3);
	 	
	 	 Item item4 = new Item();
	 	 item4.setTitle("YouTube");
	 	 item4.setDetail("http://www.youtube.com");
	 	 items.add(item4);
	 	 listView.setAdapter(new ItemBaseAdapter(this, items));
	 	 listView.setOnItemClickListener(this);
	 }
by Eakapong Kattiya
Monday, July 15, 13
2 Line List : simple_list_item_2 : SecondActivity.java
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
	 	 Item item = (Item) arg0.getItemAtPosition(arg2);
	 	 Log.i("Click listView ", item.title);
	 	 Toast.makeText(getApplicationContext(),
	 	 	 	 "Click listView " + item.title,
	 	 	 	 Toast.LENGTH_LONG).show();
	 	 Intent intent = null ;
	 	 if(arg2 == 0){
	 	 	 intent = new Intent(SecondActivity.this,FirstActivity.class)
.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	 	 }
	 	 if(arg2 == 1){
	 	 	 intent = new Intent(SecondActivity.this, SecondActivity.class)
.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	 	 }
	 	 startActivity(intent);
	 	 //finish();
	 }
by Eakapong Kattiya
Monday, July 15, 13
2 Line List : simple_list_item_2
by Eakapong Kattiya
TwoLineListItem
Monday, July 15, 13
Backward-compatible Tabs
by Eakapong Kattiya
Eclair (Android 2.3) Honeycomb (Android 4.0)
http://developer.android.com/shareables/training/TabCompat.zip
Monday, July 15, 13
Intent
by Eakapong Kattiya
Monday, July 15, 13
by Eakapong Kattiya
Intent
Intents can be used to
• Opening new activity
• Passing data between activities.
• Launching the built-in web browser and supplying a URL address
• Launching the web browser and supplying a search string
• Launching the built-in Dialer application and supplying a phone number
• Launching the built-in Maps application and supplying a location
• Launching Google StreetView and supplying a location
• Launching the built-in Camera application in still or video mode
• Launching a ringtone picker
• Recording a sound
Monday, July 15, 13
by Eakapong Kattiya
Intent : Opening new activity
Intent intent = new Intent(getApplicationContext(), WebViewActivity.class);
startActivity(intent);
//or
startActivity(new Intent(FirstActivity.this, WebViewActivity.class));
//or
startActivity(Intent.createChooser(intent, "Open url with:"));
//or
startActivityForResult(intent,1337);
FirstActivity.java
Monday, July 15, 13
by Eakapong Kattiya
Intent : Passing data between activities.
//set Extra Data before startActivity;
	 Intent intent = new Intent(this, WebViewActivity.class);
	 	 intent.putExtra("url","http://www.ibluecode.com");
	 	 intent.putExtra("tag",100);
	 	 startActivity(intent);
//get Extra Data on WebViewActivity;
	 String urlString = "http://www.default.com" ;
	 Intent intent = getIntent();
	 	 if( intent.getExtras() != null)
	 	 {
	 	 	 urlString = intent.getExtras().get("url").toString() ;
	 	 }
FirstActivity.java
WebViewActivity.java
Monday, July 15, 13
by Eakapong Kattiya
Intent : Phone call
String uriString = "tel:" + "086-673-2111" ;
Intent intent = new Intent(Intent.ACTION_DIAL); //Intent.ACTION_CALL
intent.setData(Uri.parse(uriString));
	 startActivity(intent);
FirstActivity.java
Monday, July 15, 13
by Eakapong Kattiya
Intent : Send SMS
String uriString = "smsto:" + "0866732111" ;
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(Uri.parse(uriString));
intent.putExtra("sms_body", "The SMS text");
	 startActivity(intent);
}
FirstActivity.java
Monday, July 15, 13
by Eakapong Kattiya
Intent : Send Email
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
String aEmailList[] = { "eakkattiya@gmail.com","eak.k@ibluecode.com" };
	 String aEmailCCList[] = { "eakkattiya@gmail.com" };
	 String aEmailBCCList[] = { "eakkattiya@gmail.comm" };
	 intent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
	 intent.putExtra(android.content.Intent.EXTRA_CC, aEmailCCList);
	 intent.putExtra(android.content.Intent.EXTRA_BCC, aEmailBCCList);
	 intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My subject");
	 intent.setType("plain/text");
	 intent.putExtra(android.content.Intent.EXTRA_TEXT, "My message body.");
	 startActivity(Intent.createChooser(intent, "Send your email with:"));
FirstActivity.java
Monday, July 15, 13
by Eakapong Kattiya
Intent :Take a photo
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(Intent.createChooser(intent, "Take a with:"),MY_CAMERA_REQUEST);
//Get Taken Image
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == MY_CAMERA_REQUEST && resultCode == RESULT_OK) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
ImageView imageView = (ImageView)findViewById(R.id.imageView1);
imageView.setImageBitmap(photo);
	 }
}
FirstActivity.java
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
AndroidManifest.xml
Monday, July 15, 13

More Related Content

What's hot

Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recap
furusin
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
Mike Nakhimovich
 
Android - Working with Fragments
Android - Working with FragmentsAndroid - Working with Fragments
Android - Working with Fragments
Can Elmas
 
Material Design and Backwards Compatibility
Material Design and Backwards CompatibilityMaterial Design and Backwards Compatibility
Material Design and Backwards Compatibility
Angelo Rüggeberg
 
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)
Gabor Varadi
 
Navigation Architecture Component
Navigation Architecture ComponentNavigation Architecture Component
Navigation Architecture Component
Yasutaka Kawamoto
 
Simplified Android Development with Simple-Stack
Simplified Android Development with Simple-StackSimplified Android Development with Simple-Stack
Simplified Android Development with Simple-Stack
Gabor Varadi
 
Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and Gestures
Samsung Developers
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstack
rajdeep
 
Architectures in the compose world
Architectures in the compose worldArchitectures in the compose world
Architectures in the compose world
Fabio Collini
 
Android App Development - 05 Action bar
Android App Development - 05 Action barAndroid App Development - 05 Action bar
Android App Development - 05 Action bar
Diego Grancini
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
lupe ga
 
Testing Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJavaTesting Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJava
Fabio Collini
 
Saindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender androidSaindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender android
Daniel Baccin
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation Component
Łukasz Ciupa
 
Managing parallelism using coroutines
Managing parallelism using coroutinesManaging parallelism using coroutines
Managing parallelism using coroutines
Fabio Collini
 
Mini curso Android
Mini curso AndroidMini curso Android
Mini curso Android
Mario Jorge Pereira
 

What's hot (20)

Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recap
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
Android - Working with Fragments
Android - Working with FragmentsAndroid - Working with Fragments
Android - Working with Fragments
 
Material Design and Backwards Compatibility
Material Design and Backwards CompatibilityMaterial Design and Backwards Compatibility
Material Design and Backwards Compatibility
 
droidparts
droidpartsdroidparts
droidparts
 
New text document
New text documentNew text document
New text document
 
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)
 
Navigation Architecture Component
Navigation Architecture ComponentNavigation Architecture Component
Navigation Architecture Component
 
Simplified Android Development with Simple-Stack
Simplified Android Development with Simple-StackSimplified Android Development with Simple-Stack
Simplified Android Development with Simple-Stack
 
Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and Gestures
 
Action bar
Action barAction bar
Action bar
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstack
 
Architectures in the compose world
Architectures in the compose worldArchitectures in the compose world
Architectures in the compose world
 
Android App Development - 05 Action bar
Android App Development - 05 Action barAndroid App Development - 05 Action bar
Android App Development - 05 Action bar
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
 
Testing Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJavaTesting Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJava
 
Saindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender androidSaindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender android
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation Component
 
Managing parallelism using coroutines
Managing parallelism using coroutinesManaging parallelism using coroutines
Managing parallelism using coroutines
 
Mini curso Android
Mini curso AndroidMini curso Android
Mini curso Android
 

Similar to Android basic 2 UI Design

Short Intro to Android Fragments
Short Intro to Android FragmentsShort Intro to Android Fragments
Short Intro to Android FragmentsJussi Pohjolainen
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycleAhsanul Karim
 
Androidaop 170105090257
Androidaop 170105090257Androidaop 170105090257
Androidaop 170105090257
newegg
 
What is this DI and AOP stuff anyway...
What is this DI and AOP stuff anyway...What is this DI and AOP stuff anyway...
What is this DI and AOP stuff anyway...
Richard McIntyre
 
Pertemuan 03 - Activities and intents.pptx
Pertemuan 03 - Activities and intents.pptxPertemuan 03 - Activities and intents.pptx
Pertemuan 03 - Activities and intents.pptx
MUHAMMADRIFKIPERMANA2
 
Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"
IT Event
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr Tolstykh
CodeFest
 
Android Application managing activites.pptx
Android Application managing activites.pptxAndroid Application managing activites.pptx
Android Application managing activites.pptx
Poornima E.G.
 
深入淺出談Fragment
深入淺出談Fragment深入淺出談Fragment
深入淺出談Fragment
毅 方
 
Android development - Activities, Views & Intents
Android development - Activities, Views & IntentsAndroid development - Activities, Views & Intents
Android development - Activities, Views & Intents
Lope Emano
 
02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)TECOS
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
Oursky
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
Jane Chung
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android DevelopmentJussi Pohjolainen
 
classes & objects in cpp
classes & objects in cppclasses & objects in cpp
classes & objects in cpp
gourav kottawar
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
Tomáš Kypta
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
Wingston
 
Complex Architectures in Ember
Complex Architectures in EmberComplex Architectures in Ember
Complex Architectures in Ember
Matthew Beale
 

Similar to Android basic 2 UI Design (20)

Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Short Intro to Android Fragments
Short Intro to Android FragmentsShort Intro to Android Fragments
Short Intro to Android Fragments
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycle
 
Androidaop 170105090257
Androidaop 170105090257Androidaop 170105090257
Androidaop 170105090257
 
What is this DI and AOP stuff anyway...
What is this DI and AOP stuff anyway...What is this DI and AOP stuff anyway...
What is this DI and AOP stuff anyway...
 
Pertemuan 03 - Activities and intents.pptx
Pertemuan 03 - Activities and intents.pptxPertemuan 03 - Activities and intents.pptx
Pertemuan 03 - Activities and intents.pptx
 
Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"Alexey Buzdin "Maslow's Pyramid of Android Testing"
Alexey Buzdin "Maslow's Pyramid of Android Testing"
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr Tolstykh
 
Android Application managing activites.pptx
Android Application managing activites.pptxAndroid Application managing activites.pptx
Android Application managing activites.pptx
 
深入淺出談Fragment
深入淺出談Fragment深入淺出談Fragment
深入淺出談Fragment
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Android development - Activities, Views & Intents
Android development - Activities, Views & IntentsAndroid development - Activities, Views & Intents
Android development - Activities, Views & Intents
 
02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
classes & objects in cpp
classes & objects in cppclasses & objects in cpp
classes & objects in cpp
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
Complex Architectures in Ember
Complex Architectures in EmberComplex Architectures in Ember
Complex Architectures in Ember
 

More from Eakapong Kattiya

(31 July 2013) iOS Basic Development Day 2 Human interface design
(31 July 2013) iOS Basic Development Day 2 Human interface design (31 July 2013) iOS Basic Development Day 2 Human interface design
(31 July 2013) iOS Basic Development Day 2 Human interface design Eakapong Kattiya
 
Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )
Eakapong Kattiya
 
Android Basic Development Day 1 Introduction & ADT
Android Basic Development Day 1 Introduction & ADTAndroid Basic Development Day 1 Introduction & ADT
Android Basic Development Day 1 Introduction & ADT
Eakapong Kattiya
 
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
Eakapong Kattiya
 
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
Eakapong Kattiya
 
Iphone developer advance twitter
Iphone developer advance   twitterIphone developer advance   twitter
Iphone developer advance twitter
Eakapong Kattiya
 
iOS Advance Development - Social Media
iOS Advance Development - Social MediaiOS Advance Development - Social Media
iOS Advance Development - Social Media
Eakapong Kattiya
 
Iphone developer advance location based
Iphone developer advance location basedIphone developer advance location based
Iphone developer advance location basedEakapong Kattiya
 

More from Eakapong Kattiya (8)

(31 July 2013) iOS Basic Development Day 2 Human interface design
(31 July 2013) iOS Basic Development Day 2 Human interface design (31 July 2013) iOS Basic Development Day 2 Human interface design
(31 July 2013) iOS Basic Development Day 2 Human interface design
 
Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )
 
Android Basic Development Day 1 Introduction & ADT
Android Basic Development Day 1 Introduction & ADTAndroid Basic Development Day 1 Introduction & ADT
Android Basic Development Day 1 Introduction & ADT
 
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
 
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
 
Iphone developer advance twitter
Iphone developer advance   twitterIphone developer advance   twitter
Iphone developer advance twitter
 
iOS Advance Development - Social Media
iOS Advance Development - Social MediaiOS Advance Development - Social Media
iOS Advance Development - Social Media
 
Iphone developer advance location based
Iphone developer advance location basedIphone developer advance location based
Iphone developer advance location based
 

Recently uploaded

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Android basic 2 UI Design

  • 1. by Eakapong Kattiya UI Design Monday, July 15, 13
  • 3. Fixed Tabs : Movies ,Twitter Fixed Tabs - ต้องการเน้นให้ผู้ใช้เห็นข้อมูลหน้าอื่น ๆ - ใช้เมื่อต้องสลับหน้าจอ(View) บ่อย ๆ - จํานวน Top LevelView ไม่ควรเกิน 3-5 by Eakapong Kattiya Monday, July 15, 13
  • 4. Scrollable Tabs : Google Play Store by Eakapong Kattiya Monday, July 15, 13
  • 5. Stacked Tabs :You Tube by Eakapong Kattiya Monday, July 15, 13
  • 6. TabHost : Step 1 : activity_main.xml by Eakapong Kattiya Monday, July 15, 13
  • 7. TabHost : Step 2 : MainActivity.java public class MainActivity extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TabHost mtabHost = getTabHost(); addTab1(mTabHost); addTab2(mTabHost); addTab3(mTabHost); } by Eakapong Kattiya Monday, July 15, 13
  • 8. TabHost : Step 3 : MainActivity.java void addTab1(TabHost tabHost) { // Tab for First TabSpec tbFirst = tabHost.newTabSpec("Intent"); // setting Title and Icon for the Tab tbFirst.setIndicator("Intent",null); Intent firstIntent = new Intent(this, FirstActivity.class); tbFirst.setContent(firstIntent); // Adding TapSpec to tabHost tabHost.addTab(tbFirst); } by Eakapong Kattiya Monday, July 15, 13
  • 9. TabHost : Step 4 : MainActivity.java void addTab2(TabHost tabHost) { // Tab for Second TabSpec tbSecond = tabHost.newTabSpec("WebView"); // setting Title and Icon for the Tab tbSecond.setIndicator("WebView", null); Intent secondIntent = new Intent(this,SecondActivity.class); tbSecond.setContent(secondIntent); // Adding TapSpec to tabHost tabHost.addTab(tbSecond); } by Eakapong Kattiya Monday, July 15, 13
  • 10. TabHost : Step 5 : MainActivity.java void addTab3(TabHost tabHost) { // Tab for Third TabSpec tbThird = tabHost.newTabSpec("Third"); // setting Title and Icon for the Tab tbThird.setIndicator(null, getResources().getDrawable(R.drawable.ic_tab_third)); Intent thirdIntent = new Intent(this, ThirdActivity.class); tbThird.setContent(thirdIntent); // Adding TapSpec to tabHost tabHost.addTab(tbThird); } by Eakapong Kattiya Monday, July 15, 13
  • 13. ListView * TabActivity is deprecated * use fragment Activity instead by Eakapong Kattiya Monday, July 15, 13
  • 14. Single Line List : simple_list_item_1 * TabActivity is deprecated * use fragment Activity instead android.R.layout.simple_list_item_1 by Eakapong Kattiya Monday, July 15, 13
  • 15. Single Line List : simple_list_item_1 : FirstActivity.java public class FirstActivity extends Activity implements OnItemClickListener{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_first); initListView(); } by Eakapong Kattiya Monday, July 15, 13
  • 16. Single Line List : simple_list_item_1 : FirstActivity.java * TabActivity is deprecated * use fragment Activity instead private void initListView() { // 1. Create listView object ListView listView = (ListView) findViewById(R.id.listView1); // 2. Create mArraylist object String[] stringArray = new String[]{"Phone","SMS","EMAIL","CAMERA"}; // Alternative // ArrayList<String> mArraylist = new ArrayList<String>(); // mArraylist.add("Item1"); // mArraylist.add("Item2"); // 3. Create arrayAdapter object // first parameter = context of the activity // second parameter = the type of list view // third parameter = your array ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String> (this,android.R.layout.simple_list_item_1, stringArray); listView.setAdapter(arrayAdapter); // 4. Add listView Listener listView.setOnItemClickListener(this); } by Eakapong Kattiya Monday, July 15, 13
  • 17. Single Line List : simple_list_item_1 : FirstActivity.java * TabActivity is deprecated * use fragment Activity instead public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { String item = (String) arg0.getItemAtPosition(arg2); Log.i("Click listView", item); Toast.makeText(getApplicationContext(), "Click listView " + item, Toast.LENGTH_LONG).show(); } by Eakapong Kattiya Monday, July 15, 13
  • 18. Single Line List : simple_list_item_1 by Eakapong Kattiya Monday, July 15, 13
  • 19. 2 Line List : simple_list_item_2 android.R.layout.simple_list_item_2 by Eakapong Kattiya TwoLineListItem Monday, July 15, 13
  • 20. 2 Line List : simple_list_item_2 : SecondActivity.java * TabActivity is deprecated * use fragment Activity instead public class SecondActivity extends Activity implements OnItemClickListener{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); initListView(); } by Eakapong Kattiya Monday, July 15, 13
  • 21. 2 Line List : simple_list_item_2 : SecondActivity.java * TabActivity is deprecated * use fragment Activity instead private void initListView(){ ListView listView = (ListView) findViewById(R.id.listView1); ArrayList<Item> items = new ArrayList<Item>(); Item item1 = new Item(); item1.setTitle("iBluecode"); item1.setDetail("http://www.ibluecode.com"); items.add(item1); Item item2 = new Item(); item2.setTitle("Facebook"); item2.setDetail("http://www.facebook.com"); items.add(item2); Item item3 = new Item(); item3.setTitle("Twitter"); item3.setDetail("http://www.twitter.com"); items.add(item3); Item item4 = new Item(); item4.setTitle("YouTube"); item4.setDetail("http://www.youtube.com"); items.add(item4); listView.setAdapter(new ItemBaseAdapter(this, items)); listView.setOnItemClickListener(this); } by Eakapong Kattiya Monday, July 15, 13
  • 22. 2 Line List : simple_list_item_2 : SecondActivity.java @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { Item item = (Item) arg0.getItemAtPosition(arg2); Log.i("Click listView ", item.title); Toast.makeText(getApplicationContext(), "Click listView " + item.title, Toast.LENGTH_LONG).show(); Intent intent = null ; if(arg2 == 0){ intent = new Intent(SecondActivity.this,FirstActivity.class) .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); } if(arg2 == 1){ intent = new Intent(SecondActivity.this, SecondActivity.class) .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); } startActivity(intent); //finish(); } by Eakapong Kattiya Monday, July 15, 13
  • 23. 2 Line List : simple_list_item_2 by Eakapong Kattiya TwoLineListItem Monday, July 15, 13
  • 24. Backward-compatible Tabs by Eakapong Kattiya Eclair (Android 2.3) Honeycomb (Android 4.0) http://developer.android.com/shareables/training/TabCompat.zip Monday, July 15, 13
  • 26. by Eakapong Kattiya Intent Intents can be used to • Opening new activity • Passing data between activities. • Launching the built-in web browser and supplying a URL address • Launching the web browser and supplying a search string • Launching the built-in Dialer application and supplying a phone number • Launching the built-in Maps application and supplying a location • Launching Google StreetView and supplying a location • Launching the built-in Camera application in still or video mode • Launching a ringtone picker • Recording a sound Monday, July 15, 13
  • 27. by Eakapong Kattiya Intent : Opening new activity Intent intent = new Intent(getApplicationContext(), WebViewActivity.class); startActivity(intent); //or startActivity(new Intent(FirstActivity.this, WebViewActivity.class)); //or startActivity(Intent.createChooser(intent, "Open url with:")); //or startActivityForResult(intent,1337); FirstActivity.java Monday, July 15, 13
  • 28. by Eakapong Kattiya Intent : Passing data between activities. //set Extra Data before startActivity; Intent intent = new Intent(this, WebViewActivity.class); intent.putExtra("url","http://www.ibluecode.com"); intent.putExtra("tag",100); startActivity(intent); //get Extra Data on WebViewActivity; String urlString = "http://www.default.com" ; Intent intent = getIntent(); if( intent.getExtras() != null) { urlString = intent.getExtras().get("url").toString() ; } FirstActivity.java WebViewActivity.java Monday, July 15, 13
  • 29. by Eakapong Kattiya Intent : Phone call String uriString = "tel:" + "086-673-2111" ; Intent intent = new Intent(Intent.ACTION_DIAL); //Intent.ACTION_CALL intent.setData(Uri.parse(uriString)); startActivity(intent); FirstActivity.java Monday, July 15, 13
  • 30. by Eakapong Kattiya Intent : Send SMS String uriString = "smsto:" + "0866732111" ; Intent intent = new Intent(Intent.ACTION_SENDTO); intent.setData(Uri.parse(uriString)); intent.putExtra("sms_body", "The SMS text"); startActivity(intent); } FirstActivity.java Monday, July 15, 13
  • 31. by Eakapong Kattiya Intent : Send Email Intent intent = new Intent(android.content.Intent.ACTION_SEND); String aEmailList[] = { "eakkattiya@gmail.com","eak.k@ibluecode.com" }; String aEmailCCList[] = { "eakkattiya@gmail.com" }; String aEmailBCCList[] = { "eakkattiya@gmail.comm" }; intent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList); intent.putExtra(android.content.Intent.EXTRA_CC, aEmailCCList); intent.putExtra(android.content.Intent.EXTRA_BCC, aEmailBCCList); intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My subject"); intent.setType("plain/text"); intent.putExtra(android.content.Intent.EXTRA_TEXT, "My message body."); startActivity(Intent.createChooser(intent, "Send your email with:")); FirstActivity.java Monday, July 15, 13
  • 32. by Eakapong Kattiya Intent :Take a photo Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(Intent.createChooser(intent, "Take a with:"),MY_CAMERA_REQUEST); //Get Taken Image protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == MY_CAMERA_REQUEST && resultCode == RESULT_OK) { Bitmap photo = (Bitmap) data.getExtras().get("data"); ImageView imageView = (ImageView)findViewById(R.id.imageView1); imageView.setImageBitmap(photo); } } FirstActivity.java <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> AndroidManifest.xml Monday, July 15, 13