Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.

Size: px
Start display at page:

Download "Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps."

Transcription

1 1

2 Action Bar Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1) App Icon 3) Action Buttons 2)View Control 4) Action Overflows 2

3 Action Bar 3

4 Action buttons/overflow Each definition is stored in a separate the res/menu folder. XML elements in menu file: file in <menu> : This is the root node for the file and can hold one or more <item> and <group> elements <item> : This is the single item in a menu. This may contain a nested <menu> element in order to create submenu <group>: An optional, invisible container for <items> element 4

5 <item> element supports following attributes: android:id A resource ID that's unique to the item, which allows the application can recognize the item when the user selects it android:icon A reference to a drawable to use as the item's icon. android:title A reference to a string to use as the item's title. android:showasaction Specifies when and how this item should appear as an action item in the action bar 5

6 <?xml version= 1.0 encoding= utf-8?> <menu xmlns:android= > <item android:showasaction="ifroom withtext" /> <item </menu> /> 6

7 This class is used to instantiate menu XML files into Menu objects MenuInflater.inflate() method is used for this purpose MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.game_menu, menu); 7

8 Option Menu Max of six entries per menu are shown. Excess will be displayed as part of the More option 8

9 Options Menu/Action Bar For Android 2.3 or lower, users can reveal the options menu panel by pressing the Menu button To specify the options menu for an activity, override oncreateoptionsmenu()(fragments provide their own oncreateoptionsmenu() callback). In this method, you can inflate your menu resource (defined in XML) into the Menu provided in the callback When the user selects an item from the options menu (including action items in the action bar), the system calls activity's onoptionsitemselected() method. This method passes the MenuItem selected. 9

10 Implementing Options Menu/Action public boolean oncreateoptionsmenu(menu menu) { MenuInflater inflater = getmenuinflater(); inflater.inflate(r.menu.game_menu, menu); return true; public boolean onoptionsitemselected(menuitem item) { // Handle item selection switch (item.getitemid()) { case R.id.new_game: newgame(); return true; case R.id.help: showhelp(); return true; default: return super.onoptionsitemselected(item); } } 10

11 Options Menu/Action Bar On Android 3.0 and higher, items from the options menu may be presented as the action bar as a combination of on-screen action items and overflow options The action bar is included in all activities that use the Theme.Holo theme (or one of its descendants), To request that an item appear directly in the action bar as an action button, include showasaction="ifroom" in the <item> tag android:showasaction="ifroom When your activity starts, the system populates the action items by calling your activity's oncreateoptionsmenu() method and user selection of the option is handled by onoptionsitemselected() 11

12 Customizing the Action Bar You can change the visibility of the ActionBar at runtime. The following code demonstrates that. ActionBar actionbar = getactionbar(); actionbar.hide(); // More stuff here... actionbar.show(); You can also change the text which is displayed alongside the application icon at runtime. The following example shows that: ActionBar actionbar = getactionbar(); actionbar.setsubtitle("mytest"); actionbar.settitle( sisoft.in"); 12

13 Options for the ActionBar The action bar shows an icon for the application, this is called the home icon. We can add an action to this icon. If you select this icon the onoptionsitemselected() method will be called with the value android.r.id.home The recommendation is to return to the main activity in your program Split action bar: provides a separate bar at the bottom of the screen to display all action items (API 14+) To enable split action bar, Add uioptions= "splitactionbarwhennarrow" to each <activity> element or to the <application> element. 13

14 Options for the Actionbar // If home icon is clicked return to main Activity case android.r.id.home: Intent intent = new Intent(this, OverviewActivity.class); intent.addflags(intent.flag_activity_clear_top); startactivity(intent); break; This code may not be required anymore, you can simply set the parentactivityname in the AndroidManifest.xml file, pointing to the parent activity. <activity android:name= in.sisoft.android.actionbar.customviews.secondactivity" android:label="@string/app_name" android:parentactivityname="mainactivity"> </activity> 14

15 ActionBar: Navigation Modes NAVIGATION_MODE_STANDARD : Consists of either a logo or icon and title text with an optional subtitle. Clicking any of these elements will dispatch onoptionsitemselected to the host Activity with a MenuItem with item ID android.r.id.home. NAVIGATION_MODE_TAB: Offers tab navigation NAVIGATION_MODE_LIST: Offers a built in drop-down list() 15

16 ActionBar: Navigation Tab Specify the Action Bar Mode to Tab actionbar.setnavigationmode(actionbar.navigation_mode_tabs); Implement the ActionBar.TabListener interface. This interface provides callbacks for tab events, such as when the user presses one so you can swap the tabs. Add new Tabs using ActionBar.Tab and set Text, Icon and Listener Tab tab1 = actionbar.newtab().settext("tab " + (i + 1)).setTabListener(tabListener)); Then add each tab to the action bar by calling addtab() actionbar.addtab(tab1) 16

17 ActionBar: Drop Down Navigation Create a SpinnerAdapter that provides the list of selectable items for the drop-down and the layout to use when drawing each item in the list. Implement ActionBar.OnNavigationListener to define the behavior that occurs when the user selects an item from the list. During your activity's oncreate() method, enable the action bar's drop-down list by calling setnavigationmode(navigation_mode_list) Set the callback for the drop-down list with setlistnavigationcallbacks() 17

18 ToolBar A Toolbar is a generalization of action bars for use within application layouts. While an action bar is traditionally part of an Activity's opaque window decor controlled by the framework, A Toolbar may be placed at any arbitrary level of nesting within a view hierarchy. An application may choose to designate a Toolbar as the action bar for an Activity using the setactionbar() method. Toolbar supports a more focused feature set than ActionBar. 18

19 View Pager (Swipe Views) 19

20 Viewpager is the best way to switching among view. It provide a way to swipe views from left to right and right to left. Viewpager provide strong way to swipe any views. It does not support in lower android version so add the support library when you are using viewpager in your application. ViewPagers source their views from PagerAdapters which give you have full control over the reuse and recycling of the views. 20

21 To create viewpager do following steps. 1. Create a xml file and add the support library to use viewpager. 2. Then in MainActivity create object of ViewPagerAdapter class and set Adapter to ViewPager object using setadapter method. 3. In ViewPagerAdapter class implement PagerAdapter to generate the pages that the view shows. 21

22 1. Create a xml file and add the support library to use viewpager. 22

23 <RelativeLayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent tools:context=".viewpagersimplemainactivity" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" > <android.support.v4.view.viewpager android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#d2691e" /> </RelativeLayout> </RelativeLayout> 23

24 2. Then in MainActivity create object of ViewPagerAdapter class and set Adapter to ViewPager object using setadapter method. 24

25 public class MainActivity extends Activity { int size=6; ViewPager protected void oncreate (Bundle savedinstancestate) { super. oncreate (savedinstancestate); setcontentview (R.layout.activity_view_pager_simple_main); ViewPagerAdapter adapter = new ViewPagerAdapter(MainActivity.this, size); mypager = (ViewPager) findviewbyid(r.id.reviewpager); mypager.setadapter(adapter); mypager.setcurrentitem(0); } 25

26 ViewPagerAdapter adapter = new ViewPagerAdapter(MainActivity. this, size); In this line we cerate an object of ViewPagerAdapter class. So we create a class this name and create a constructor of this class and passes the argument from main activity class to ViewPagerAdapter Class. public class ViewPagerAdapter { int noofpages ; Activity act; public ViewPagerAdapter (MainActivity mainactivity, int size) { Noofpages =size; Act=mainactivity ; } 26

27 3. In ViewPagerAdapter class implement PagerAdapter to generate the pages that the view shows. 27

28 In ViewPagerAdapter Class when we implement PagerAdapter then we must override below methods at minimum : 1. instantiateitem(viewgroup container, int position) : Create the page for the given position. 2. destroyitem(viewgroup container, int position, Object ob) : Remove a page for the given position. 3. getcount(): Return the number of views available. 4. isviewfromobject(view v, Object ob ) : Determines whether a page View is associated with a specific key object as returned by instantiateitem(viewgroup, int). This method is required for a PagerAdapter to function properly. 28

29 1. public int public int getcount() { // TODO Auto-generated method stub return noofpages; } 29

30 2. public boolean isviewfromobject (View v, Object public boolean isviewfromobject (View v, Object o) { // TODO Auto-generated method stub return v== ((View) o); } 30

31 3. public Object instantiateitem (View v, int pos) Parameters Container : The containing View in which the page will be shown. Position: The page position to be instantiated. Returns Returns an Object representing the new page. This does not need to be a View, but can be some other container of the page. 31

32 4. public void destroyitem (ViewGroup container, int position, Object object) Parameters Container: The containing View from which the page will be removed. Position: The page position to be removed. Object: The same object that was returned by instantiateitem(view, int). 32

33 Activity ViewPager with PageNumbers Example in Android 33

34 <RelativeLayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent tools:context=".viewpagersimplemainactivity" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" > <android.support.v4.view.viewpager android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#d2691e" /> </RelativeLayout> </RelativeLayout> 34

35 MainActivity.class public class MainActivity extends Activity { int size=6; ViewPager protected void oncreate (Bundle savedinstancestate) { super. oncreate (savedinstancestate); setcontentview (R.layout.activity_view_pager_simple_main); ViewPagerAdapter adapter = new ViewPagerAdapter(MainActivity.this, size); mypager = (ViewPager) findviewbyid(r.id.reviewpager); mypager.setadapter(adapter); mypager.setcurrentitem(0); } 35

36 ViewPagerAdapter.class public class ViewPagerAdapter extends PagerAdapter { int noofpages; Activity act; View layout; TextView pagenumber; Button click; public ViewPagerAdapter( ViewPagerSimpleMainActivity viewpagersimplemainactivity, int size) { // TODO Auto-generated constructor stub noofpages=size; act=viewpagersimplemainactivity; } 36

37 public int getcount() { // TODO Auto-generated method stub return noofpages; public boolean isviewfromobject(view arg0, Object arg1) { // TODO Auto-generated method stub return arg0 == ((View) arg1); } 37

38 public Object instantiateitem(view container, int position) { LayoutInflater inflater = (LayoutInflater) act.getsystemservice(context.layout_inflater_service); layout = inflater.inflate(r.layout.pages, null); pagenumber = (TextView) layout.findviewbyid(r.id.pagenumber); int pagenumbertxt=position + 1; pagenumber.settext("now your in Page No " +pagenumbertxt ); ((ViewPager) container).addview(layout, 0); return layout; } 38

39 public void destroyitem(view arg0, int arg1, Object arg2) { ((ViewPager) arg0).removeview((view) arg2); } } 39

40 Run 40

41 Navigation Drawer 41

42 The navigation drawer is a panel that displays the app s main navigation options on the left edge of the screen. It is hidden most of the time, but is revealed when the user swipes a finger from the left edge of the screen or, while at the top level of the app, the user touches the app icon in the action bar. With navigation drawer, you can easily develop app with YouTube or Google+ apps like navigation. 42

43 43

44 Create a Navigation Drawer 44

45 To add a navigation drawer, declare your user interface with adrawerlayout object as the root view of your layout. Inside thedrawerlayout, add one view that contains the main content for the screen (your primary layout when the drawer is hidden) and another view that contains the contents of the navigation drawer. 45

46 DrawerLayout : DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from the edge of the window. FrameLayout : FrameLayout is used to replace the main content using Fragments and it should be always the first child of the layout for z-index purpose. 46

47 XML Layout <android.support.v4.widget.drawerlayout xmlns:android=" xmlns:tools=" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- The main content view --> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" /> <!-- The navigation drawer list --> <ListView android:layout_width="200dp" android:layout_height="match_parent" android:layout_gravity="left start" android:background="#ffeeeeee"/> </android.support.v4.widget.drawerlayout> 47

48 This layout demonstrates some important layout characteristics: 1. The main content view (the FrameLayout above) must be the first child in the DrawerLayout because the XML order implies z-ordering and the drawer must be on top of the content. 2. The main content view is set to match the parent view's width and height, because it represents the entire UI when the navigation drawer is hidden. 3. The drawer view (the ListView) must specify its horizontal gravity with the android:layout_gravityattribute. To support right-to-left (RTL) languages, specify the value with "start" instead of "left" (so the drawer appears on the right when the layout is RTL). 4. The drawer view specifies its width in dp units and the height matches the parent view. The drawer width should be no more than 320dp so the user can always see a portion of the main content. 48

49 In main activity we do following things: 1. Initialize the Drawer List. 2. Handle Navigation Click Events 3. Add a Toggle Switch in the Action Bar 4. Listen for Open and Close Events 5. Open and Close with the App Icon 49

50 1. Initialize the Drawer List 1. The first thing in main activity is to initialize the navigation drawer's list of items. Navigation drawer often consists of a ListView, which should be populated by an Adapter (such as ArrayAdapter or SimpleCursorAdapter). 2. If the list of items present in resource file. Then we use another coding to get those items. 50

51 public class MainActivity extends Activity { 1. Coding String[] arraylist = {"Android","Cupcake","Dunut","Eclair","Froyo }; DrawerLayout dl; ListView lv; ArrayAdapter<String> protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); lv = (ListView) findviewbyid(r.id.left_drawer); adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,arraylist); // Set the adapter for the list view lv.setadapter(adapter); 51

52 public class MainActivity extends Activity { String[] arraylist ; ListView lv; ArrayAdapter<String> adapter; 2. protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); lv = (ListView) findviewbyid(r.id.left_drawer); arraylist= getresources().getstringarray(r.array.titles); adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,arraylist); // Set the adapter for the list view lv.setadapter(adapter); 52

53 2. Handle Navigation Click Events When the user selects an item in the drawer's list, the system calls onitemclick() on the OnItemClickListener given to setonitemclicklistener(). 53

54 Coding lv.setonitemclicklistener(new public void onitemclick(adapterview<?> parent, View v, int position, long id) { Toast.makeText(MainActivity.this, "Time for an upgrade!", Toast.LENGTH_SHORT).show(); } This is the minimum basic code we need for a navigation drawer, but there is much more we can do! 54

55 3. Enabling action bar app icon We can use the default icon provided by Android with a few more changes in our Activity. We can show it by adding two lines in our oncreate() method. // enabling action bar app icon and behaving it as toggle button getactionbar().setdisplayhomeasupenabled (true); getactionbar().sethomebuttonenabled (true); 55

56 Let s start with a few new member variable for this new object. We need one for the toggle, one for the DrawerLayout we added to our layout, and a String that we will use to update the title in the Action Bar: private ActionBarDrawerToggle mdrawertoggle; private DrawerLayout mdrawerlayout; private String mactivitytitle; 56

57 ActionBarDrawerToggle 1. This class provides a handy way to tie together the functionality of DrawerLayout and the framework ActionBar to implement the recommended design for navigation drawers. When using the ActionBarDrawerToggle, you must call it following methods corresponding to your Activity callbacks: 1. onpostcreate() 2. onconfigurationchanged() onoptionsitemselected() 4. onprepareoptionsmenu() 57

58 1. onpostcreate() Note that the icon isn t quite in sync with the drawer. So we need to call onpostcreate() lifecycle method in our Activity. Inside onpostcreate(), call mdrawertoggle.syncstate() to sync the indicator to match the current state of the navigation drawer. protected void onpostcreate(bundle savedinstancestate) { super.onpostcreate(savedinstancestate); // Sync the toggle state after onrestoreinstancestate has occurred. mdrawertoggle.syncstate(); } 58

59 2. onconfigurationchanged() The other scenario we need to plan for to keep things in sync is when the configuration of the Activity changes, like, for example, going from portrait to landscape or showing the soft keyboard on the screen. We do this in the Activity s onconfigurationchanged() method, which you may need to public void onconfigurationchanged(configuration c) { super. OnConfigurationChanged(c); // Pass any configuration change to the drawer toggles mdrawertoggle.onconfigurationchanged (c); } 59

60 3. onoptionsitemselected() 1. This method should be called by your Activity's onoptionsitemselected method. If it returns true, youronoptionsitemselected method should return true and skip further public boolean onoptionsitemselected (MenuItem item) { // toggle nav drawer on selecting action bar app icon/title if (mdrawertoggle.onoptionsitemselected(item)) { return true; } // Handle action bar actions click switch (item.getitemid()) { case : R.id.action_settings return true; default : return super.onoptionsitemselected(item); } } 60

61 4) onprepareoptionsmenu(menu menu) Called when invalidateoptionsmenu() is triggered Called when invalidateoptionsmenu() is triggered public boolean onprepareoptionsmenu (Menu menu) { // if nav drawer is opened, hide the action items boolean d = mdrawerlayout.isdraweropen (mdrawerlist); menu.finditem (R.id.action_settings).setVisible(!d); return super.onprepareoptionsmenu(menu); } 61

62 4. Make ActionBar app icon as a Toggle Button To do this firstly set mdrawerlayout nd mactivitytitle in oncreate(). private ActionBarDrawerToggle mdrawertoggle; private DrawerLayout mdrawerlayout; private String mactivitytitle; mdrawerlayout = (DrawerLayout)findViewById(R.id.drawer_layout); mactivitytitle = gettitle().tostring(); Using a toggle requires two String resources, so let s add those in strings.xml. <string name="drawer_open">open navigation drawer</string> <string name="drawer_close">close navigation drawer</string> 62

63 5. Listen for Open and Close Events 63

64 We want to create a new ActionBarDrawerToggle instance that uses the context, mdrawerlayout, and those two new string resources we added, and then we need to implement two methods: 1. ondraweropened() 2. ondrawerclosed(): mdrawertoggle = new ActionBarDrawerToggle(this, mdrawerlayout, R.string.drawer_open, R.string.drawer_close) private void setupdrawer() { } { /** Called when a drawer has settled in a completely open state. */ public void ondraweropened (View drawerview) { } /** Called when a drawer has settled in a completely closed state. */ public void ondrawerclosed (View v) { } }; 64

65 At this point our toggle still won t work. We need to add two more lines to enable the drawer indicator (the lovely hamburger menu) and then attach this new toggle object to our drawer layout. Add these two lines in setupdrawer() after mdrawertoggle is set: private void setupdrawer () { mdrawertoggle. setdrawerindicatorenabled (true); mdrawerlayout. setdrawerlistener (mdrawertoggle); } 65

66 When the drawer is opened, we can set a new title for the Action Bar (if we want). We also want to invalidate the options menu in case it needs to be recreated with different options for when the navigation drawer is open: /** Called when a drawer has settled in a completely open state. */ public void ondraweropened(view drawerview) { getactionbar().settitle("navigation!"); invalidateoptionsmenu(); // creates call to onprepareoptionsmenu() } 66

67 And then when it is closed we will do the opposite. Revert the title (which we stored inmactivitytitle) and again invalidate the options menu: /** Called when a drawer has settled in a completely closed state. */ public void ondrawerclosed(view view) { super.ondrawerclosed(view); getactionbar().settitle(mactivitytitle); invalidateoptionsmenu(); // creates call to onprepareoptionsmenu() } 67

68 Run 68

69 Context Menu There are two ways to provide contextual actions: In a floating context menu. A menu appears as a floating list of menu items (similar to a dialog) when the user performs a long-click (press and hold) on a view that declares support for a context menu. Users can perform a contextual action on one item at a time. In the contextual action mode. This mode is a system implementation of ActionMode that displays a contextual action bar at the top of the screen with action items that affect the selected item(s). When this mode is active, users can perform an action on multiple items at once (if your app allows it). 69

70 Using Context Menu Each view could have an associated Context Menu Long-press a textbox to invoke its Context Menu 70

71 Creating a floating context menu Register the View to which the context menu should be associated by calling registerforcontextmenu() and pass it the View. If your activity uses a ListView or GridView and you want each item to provide the same context menu, register all items for a context menu by passing the ListView or GridView to registerforcontextmenu() Implement the oncreatecontextmenu() method in your Activity or Fragment Implement oncontextitemselected(). When the user selects a menu item, the system calls this method so you can perform the appropriate action. 71

Action Bar. (c) 2010 Haim Michael. All Rights Reserv ed.

Action Bar. (c) 2010 Haim Michael. All Rights Reserv ed. Action Bar Introduction The Action Bar is a widget that is shown on top of the screen. It includes the application logo on its left side together with items available from the options menu on the right.

More information

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Multiple devices Multiple devices Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Create a new directory in your project's res/ and name it using the

More information

05. RecyclerView and Styles

05. RecyclerView and Styles 05. RecyclerView and Styles 08.03.2018 1 Agenda Intents Creating Lists with RecyclerView Creating Cards with CardView Application Bar Menu Styles and Themes 2 Intents 3 What is Intent? An Intent is an

More information

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright...

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright... Contents com.taxi.ui Class CallDialog... 3 CallDialog... 4 show... 4 build... 5 com.taxi.custom Class CustomActivity... 5 TOUCH... 6 CustomActivity... 6 onoptionsitemselected... 6 onclick... 6 com.taxi.model

More information

ListView Containers. Resources. Creating a ListView

ListView Containers. Resources. Creating a ListView ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon

More information

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each

More information

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { } Android ActionBar import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { Layout, activity.xml

More information

Meniu. Create a project:

Meniu. Create a project: Meniu Create a project: Project name: P0131_MenuSimple Build Target: Android 2.3.3 Application name: MenuSimple Package name: ru.startandroid.develop.menusimple Create Activity: MainActivity Open MainActivity.java.

More information

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments CS371m - Mobile Computing More UI Action Bar, Navigation, and Fragments ACTION BAR 2 Options Menu and Action Bar prior to Android 3.0 / API level 11 Android devices required a dedicated menu button Pressing

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should

More information

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars CS371m - Mobile Computing More UI Navigation, Fragments, and App / Action Bars EFFECTIVE ANDROID NAVIGATION 2 Clicker Question Have you heard of the terms Back and Up in the context of Android Navigation?

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 2 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 1 -recap What is Android How to develop Android applications Run & debug the applications

More information

Creating a Custom ListView

Creating a Custom ListView Creating a Custom ListView References https://developer.android.com/guide/topics/ui/declaring-layout.html#adapterviews Overview The ListView in the previous tutorial creates a TextView object for each

More information

Android Navigation Drawer for Sliding Menu / Sidebar

Android Navigation Drawer for Sliding Menu / Sidebar Android Navigation Drawer for Sliding Menu / Sidebar by Kapil - Tuesday, December 15, 2015 http://www.androidtutorialpoint.com/material-design/android-navigation-drawer-for-sliding-menusidebar/ YouTube

More information

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath 1 Framework Support (e.g. Android) 2 Framework Capabilities

More information

Android Programs Day 5

Android Programs Day 5 Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()

More information

Mobile and Ubiquitous Computing: Android Programming (part 3)

Mobile and Ubiquitous Computing: Android Programming (part 3) Mobile and Ubiquitous Computing: Android Programming (part 3) Master studies, Winter 2015/2016 Dr Veljko Pejović Veljko.Pejovic@fri.uni-lj.si Based on Programming Handheld Systems, Adam Porter, University

More information

Open Lecture Mobile Programming. Intro to Material Design

Open Lecture Mobile Programming. Intro to Material Design Open Lecture Mobile Programming Intro to Material Design Agenda Introduction to Material Design Applying a Material Theme Toolbar/Action Bar Navigation Drawer RecyclerView CardView Support Design Widgets/Tools

More information

Our First Android Application

Our First Android Application Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,

More information

Create Parent Activity and pass its information to Child Activity using Intents.

Create Parent Activity and pass its information to Child Activity using Intents. Create Parent Activity and pass its information to Child Activity using Intents. /* MainActivity.java */ package com.example.first; import android.os.bundle; import android.app.activity; import android.view.menu;

More information

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters Mobile Programming Lecture 5 Composite Views, Activities, Intents and Filters Lecture 4 Review How do you get the value of a string in the strings.xml file? What are the steps to populate a Spinner or

More information

Android Application Model I

Android Application Model I Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath Reading: Big Nerd Ranch Guide, Chapters 3, 5 (Activities);

More information

Mobila applikationer och trådlösa nät, HI1033, HT2013

Mobila applikationer och trådlösa nät, HI1033, HT2013 Mobila applikationer och trådlösa nät, HI1033, HT2013 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android

More information

CS378 -Mobile Computing. More UI -Part 2

CS378 -Mobile Computing. More UI -Part 2 CS378 -Mobile Computing More UI -Part 2 Special Menus Two special application menus options menu context menu Options menu replaced by action bar (API 11) menu action bar 2 OptionsMenu User presses Menu

More information

EMBEDDED SYSTEMS PROGRAMMING UI and Android

EMBEDDED SYSTEMS PROGRAMMING UI and Android EMBEDDED SYSTEMS PROGRAMMING 2016-17 UI and Android STANDARD GESTURES (1/2) UI classes inheriting from View allow to set listeners that respond to basic gestures. Listeners are defined by suitable interfaces.

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

CS 4330/5390: Mobile Application Development Exam 1

CS 4330/5390: Mobile Application Development Exam 1 1 Spring 2017 (Thursday, March 9) Name: CS 4330/5390: Mobile Application Development Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and closed-book.

More information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

Teaching materials and advanced sample applications for Android platform

Teaching materials and advanced sample applications for Android platform MASARYK UNIVERSITY FACULTY OF INFORMATICS Teaching materials and advanced sample applications for Android platform MASTER THESIS Bc. Vanda Cabanová Brno, 2014 Statement of an author of a school work Student

More information

Chapter 7: Reveal! Displaying Pictures in a Gallery

Chapter 7: Reveal! Displaying Pictures in a Gallery Chapter 7: Reveal! Displaying Pictures in a Gallery Objectives In this chapter, you learn to: Create an Android project using a Gallery control Add a Gallery to display a horizontal list of images Reference

More information

Designing and Implementing Android UIs for Phones and Tablets

Designing and Implementing Android UIs for Phones and Tablets Designing and Implementing Android UIs for Phones and Tablets Matias Duarte Rich Fulcher Roman Nurik Adam Powell Christian Robertson #io2011 #Android 2 Ask questions Give feedback http://goo.gl/mod/zdyr

More information

UI Fragment.

UI Fragment. UI Fragment 1 Contents Fragments Overviews Lifecycle of Fragments Creating Fragments Fragment Manager and Transactions Adding Fragment to Activity Fragment-to-Fragment Communication Fragment SubClasses

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie User Interface Design" & Development -

More information

Have a development environment in 256 or 255 Be familiar with the application lifecycle

Have a development environment in 256 or 255 Be familiar with the application lifecycle Upcoming Assignments Readings: Chapter 4 by today Horizontal Prototype due Friday, January 22 Quiz 2 today at 2:40pm Lab Quiz next Friday during lecture time (2:10-3pm) Have a development environment in

More information

Adapter.

Adapter. 1 Adapter An Adapter object acts as a bridge between an AdapterView and the underlying data for that view The Adapter provides access to the data items The Adapter is also responsible for making a View

More information

Android Development Community. Let s do Material Design

Android Development Community. Let s do Material Design Let s do Material Design Agenda Introduction to Material Design Toolbar Navigation Drawer SwipeRefreshLayout RecyclerView Floating Action Button CardView Toolbar - Lives in package android.support.v7.widget

More information

Introducing the Android Menu System

Introducing the Android Menu System Introducing the Android Menu System If you ve ever tried to navigate a mobile phone menu system using a stylus or trackball, you ll know that traditional menu systems are awkward to use on mobile devices.

More information

South Africa Version Control.

South Africa Version Control. South Africa 2013 Lecture 7: User Interface (Navigation)+ Version Control http://aiti.mit.edu South Africa 2013 Today s agenda Recap Navigation Version Control 2 Tutorial Recap Activity 1 Activity 2 Text

More information

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015 Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional

More information

ANDROID USER INTERFACE

ANDROID USER INTERFACE 1 ANDROID USER INTERFACE Views FUNDAMENTAL UI DESIGN Visual interface element (controls or widgets) ViewGroup Contains multiple widgets. Layouts inherit the ViewGroup class Activities Screen being displayed

More information

Chapter 8 Positioning with Layouts

Chapter 8 Positioning with Layouts Introduction to Android Application Development, Android Essentials, Fifth Edition Chapter 8 Positioning with Layouts Chapter 8 Overview Create user interfaces in Android by defining resource files or

More information

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application

More information

Graphical User Interfaces

Graphical User Interfaces Graphical User Interfaces Some suggestions Avoid displaying too many things Well-known anti-patterns Display useful content on your start screen Use action bars to provide consistent navigation Keep your

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer

More information

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based

More information

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University User Interface: Layout Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University http://twitter.com/krunapon Agenda User Interface Declaring Layout Common Layouts User Interface

More information

User Interface Development. CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr.

User Interface Development. CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr. User Interface Development CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr. Rajiv Ramnath 1 Outline UI Support in Android Fragments 2 UI Support in the Android

More information

Developing Android Applications

Developing Android Applications Developing Android Applications SEG2105 - Introduction to Software Engineering Fall 2016 Presented by: Felipe M. Modesto TA & PhD Candidate Faculty of Engineering Faculté de Génie uottawa.ca Additional

More information

Starting Another Activity Preferences

Starting Another Activity Preferences Starting Another Activity Preferences Android Application Development Training Xorsat Pvt. Ltd www.xorsat.net fb.com/xorsat.education Outline Starting Another Activity Respond to the Button Create the

More information

CHAPTER 4. Fragments ActionBar Menus

CHAPTER 4. Fragments ActionBar Menus CHAPTER 4 Fragments ActionBar Menus Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to configure the ActionBar Implement Fragments with Responsive

More information

1. Simple List. 1.1 Simple List using simple_list_item_1

1. Simple List. 1.1 Simple List using simple_list_item_1 1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist

More information

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners Layouts and Views http://developer.android.com/guide/topics/ui/declaring-layout.html http://developer.android.com/reference/android/view/view.html Repo: https://github.com/karlmorris/viewsandlayouts Overview

More information

Mobile Computing Practice # 2c Android Applications - Interface

Mobile Computing Practice # 2c Android Applications - Interface Mobile Computing Practice # 2c Android Applications - Interface One more step in the restaurants application. 1. Design an alternative layout for showing up in landscape mode. Our current layout is not

More information

Android Basics. Android UI Architecture. Android UI 1

Android Basics. Android UI Architecture. Android UI 1 Android Basics Android UI Architecture Android UI 1 Android Design Constraints Limited resources like memory, processing, battery à Android stops your app when not in use Primarily touch interaction à

More information

Android Using Menus. Victor Matos Cleveland State University

Android Using Menus. Victor Matos Cleveland State University Lesson 8 Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright 2008-2009 CommonsWare, LLC. ISBN: 978-0-9816780-0-9 & Android Developers http://developer.android.com/index.html

More information

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android.

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. - A dialog is a small window that prompts the user to make a decision or enter additional information. - A dialog does

More information

Android AND-401. Android Application Development. Download Full Version :

Android AND-401. Android Application Development. Download Full Version : Android AND-401 Android Application Development Download Full Version : http://killexams.com/pass4sure/exam-detail/and-401 QUESTION: 113 Consider the following :

More information

Programming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Programming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna Programming with Android: Introduction Layouts Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna Views: outline Main difference between a Drawable and

More information

Screen Slides. The Android Studio wizard adds a TextView to the fragment1.xml layout file and the necessary code to Fragment1.java.

Screen Slides. The Android Studio wizard adds a TextView to the fragment1.xml layout file and the necessary code to Fragment1.java. Screen Slides References https://developer.android.com/training/animation/screen-slide.html https://developer.android.com/guide/components/fragments.html Overview A fragment can be defined by a class and

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

Mobile User Interfaces

Mobile User Interfaces Mobile User Interfaces CS 2046 Mobile Application Development Fall 2010 Announcements Next class = Lab session: Upson B7 Office Hours (starting 10/25): Me: MW 1:15-2:15 PM, Upson 360 Jae (TA): F 11:00

More information

Mobile Computing Fragments

Mobile Computing Fragments Fragments APM@FEUP 1 Fragments (1) Activities are used to define a full screen interface and its functionality That s right for small screen devices (smartphones) In bigger devices we can have more interface

More information

Topics of Discussion

Topics of Discussion Reference CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing Fragments, ActionBar and Menus Part 3 of 5 Android Programming Concepts, by Trish Cornez and Richard Cornez, pubslihed by Jones

More information

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Gill Cleeren Agenda Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Lists and navigation Navigating from master to detail Optimizing the application Preparing

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer

More information

Mobile Programming Lecture 7. Dialogs, Menus, and SharedPreferences

Mobile Programming Lecture 7. Dialogs, Menus, and SharedPreferences Mobile Programming Lecture 7 Dialogs, Menus, and SharedPreferences Agenda Dialogs Menus SharedPreferences Android Application Components 1. Activity 2. Broadcast Receiver 3. Content Provider 4. Service

More information

Fragments. Lecture 11

Fragments. Lecture 11 Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi Introduction An application is composed of at least one Activity GUI It is a software component that stays behind a GUI (screen) Activity It runs inside the

More information

UNDERSTANDING ACTIVITIES

UNDERSTANDING ACTIVITIES Activities Activity is a window that contains the user interface of your application. An Android activity is both a unit of user interaction - typically filling the whole screen of an Android mobile device

More information

Produced by. Mobile Application Development. Eamonn de Leastar

Produced by. Mobile Application Development. Eamonn de Leastar Mobile Application Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie A First

More information

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering Getting Started Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador 1 Goals Setting up your development environment Android Framework

More information

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents Mobile Programming Lecture 3 Resources, Selection, Activities, Intents Lecture 2 Review What widget would you use to allow the user to enter a yes/no value a range of values from 1 to 100 What's the benefit

More information

Android. The Toolbar

Android. The Toolbar Android The Toolbar Credits Lectures are heavily based of materials and examples from: Android Programming The Big Nerd Ranch Guides Bill Phillips and Brian Hardy April 7, 2013 ToDoList We re going to

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

Android Layout Types

Android Layout Types Android Layout Types Android Linear Layout Android LinearLayout is a view group that aligns all children in either vertically or horizontally. android:divider - This is drawable to use as a vertical divider

More information

UI, Continued. CS 2046 Mobile Application Development Fall Jeff Davidson CS 2046

UI, Continued. CS 2046 Mobile Application Development Fall Jeff Davidson CS 2046 UI, Continued CS 2046 Mobile Application Development Fall 2010 Announcements Office hours have started HW1 is out, due Monday, 11/1, at 11:59 pm Clarifications on HW1: To move where the text appears in

More information

CS371m - Mobile Computing. User Interface Basics

CS371m - Mobile Computing. User Interface Basics CS371m - Mobile Computing User Interface Basics Clicker Question Have you ever implemented a Graphical User Interface (GUI) as part of a program? A. Yes, in another class. B. Yes, at a job or internship.

More information

Announcements. Android: n-puzzle Walkthrough. Tommy MacWilliam. Dynamic GUIs. ListViews. Bitmaps. Gameplay. Saving State. Menus

Announcements. Android: n-puzzle Walkthrough. Tommy MacWilliam. Dynamic GUIs. ListViews. Bitmaps. Gameplay. Saving State. Menus Harvard University February 22, 2012 Announcements Lecture videos: https://www.cs76.net/lectures Section videos: https://www.cs76.net/sections videos: https://www.cs76.net/projects Today dynamic GUIs bitmaps

More information

Android Using Menus. Victor Matos Cleveland State University

Android Using Menus. Victor Matos Cleveland State University 8 Android Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright 2008-2009 CommonsWare, LLC. ISBN: 978-0-9816780-0-9 & Android Developers http://developer.android.com/index.html

More information

The Suggest Example layout (cont ed)

The Suggest Example layout (cont ed) Using Web Services 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 7: Working with Web Services Android provides a full set of Java-standard networking APIs, such as the java.net package containing among

More information

Introduction To JAVA Programming Language

Introduction To JAVA Programming Language Introduction To JAVA Programming Language JAVA is a programming language which is used in Android App Development. It is class based and object oriented programming whose syntax is influenced by C++. The

More information

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

Building MyFirstApp Android Application Step by Step. Sang Shin   Learn with Passion! Building MyFirstApp Android Application Step by Step. Sang Shin www.javapassion.com Learn with Passion! 1 Disclaimer Portions of this presentation are modifications based on work created and shared by

More information

Fragments and the Maps API

Fragments and the Maps API Fragments and the Maps API Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Fragments Fragments Fragment A behavior or a portion of a user

More information

Mobila applikationer och trådlösa nät, HI1033, HT2012

Mobila applikationer och trådlösa nät, HI1033, HT2012 Mobila applikationer och trådlösa nät, HI1033, HT2012 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android

More information

Practical 1.ListView example

Practical 1.ListView example Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml

More information

CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming. Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming. Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming Emmanuel Agu Editting in Android Studio Recall: Editting Android Can edit apps in: Text View: edit XML directly Design

More information

Software Engineering Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 27, 2017

Software Engineering Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 27, 2017 Software Engineering Large Practical: Storage, Settings and Layouts Stephen Gilmore School of Informatics October 27, 2017 Contents 1. Storing information 2. Settings 3. Layouts 1 Storing information Storage

More information

GUI Widget. Lecture6

GUI Widget. Lecture6 GUI Widget Lecture6 AnalogClock/Digital Clock Button CheckBox DatePicker EditText Gallery ImageView/Button MapView ProgressBar RadioButton Spinner TextView TimePicker WebView Android Widgets Designing

More information

When programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are:

When programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are: ETSN05, Fall 2017, Version 1.0 Software Development of Large Systems Lab 2 preparations Read through this document carefully. In order to pass lab 2, you will need to understand the topics presented in

More information

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Entire Lifetime An activity begins its lifecycle when entering the oncreate() state If not interrupted

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2 Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control

More information

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9)

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics ArrayAdapter Preferences Widgets Jonathan Diehl, Hendrik Thüs 2 ArrayAdapter Jonathan Diehl, Hendrik Thüs

More information

Introductory Mobile App Development

Introductory Mobile App Development Introductory Mobile App Development 152-160 Quick Links & Text References Overview Pages ListView Pages ArrayAdaper Pages Filling a ListView Pages Sensing Click Pages Selected Item Info Pages Configuring

More information

1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation

1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation 1. Location Services 1.1 GPS Location 1. Create the Android application with the following attributes. Application Name: MyLocation Project Name: Package Name: MyLocation com.example.mylocation 2. Put

More information

More Effective Layouts

More Effective Layouts More Effective Layouts In past weeks, we've looked at ways to make more effective use of the presented display (e.g. elastic layouts, and separate layouts for portrait and landscape), as well as autogenerating

More information

Chapter 5 Flashing Neon FrameLayout

Chapter 5 Flashing Neon FrameLayout 5.1 Case Overview This case mainly introduced the usages of FrameLayout; we can use FrameLayout to realize the effect, the superposition of multiple widgets. This example is combined with Timer and Handler

More information

Programmation Mobile Android Master CCI

Programmation Mobile Android Master CCI Programmation Mobile Android Master CCI Bertrand Estellon Aix-Marseille Université March 23, 2015 Bertrand Estellon (AMU) Android Master CCI March 23, 2015 1 / 266 Navigation entre applications Nous allons

More information

Programming Android UI. J. Serrat Software Design December 2017

Programming Android UI. J. Serrat Software Design December 2017 Programming Android UI J. Serrat Software Design December 2017 Preliminaries : Goals Introduce basic programming Android concepts Examine code for some simple examples Limited to those relevant for the

More information

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Android Lifecycle An activity begins its lifecycle when entering the oncreate() state If not

More information