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

Similar documents
Class About... 3 Constructor Detail... 4 Method Detail... 4 Class CalendarAdapter Field Detail... 24

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.

EMBEDDED SYSTEMS PROGRAMMING UI and Android

Fragments and the Maps API

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

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

ListView Containers. Resources. Creating a ListView

05. RecyclerView and Styles

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

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

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

Activities and Fragments

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

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

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

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

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

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

Android Application Model I

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

Class CustomActivity... 2 Field Detail Constructor Detail Method Detail... 13

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

Android Basics. Android UI Architecture. Android UI 1

LAMPIRAN. public class MainActivity extends AppCompatActivity {

Developing Android Applications

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

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

TextView. A label is called a TextView. TextViews are typically used to display a caption TextViews are not editable, therefore they take no input

Minds-on: Android. Session 2

Mobile Development Lecture 10: Fragments

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L

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

Mobile Computing Fragments

Android User Interface Overview. Most of the material in this sec7on comes from h8p://developer.android.com/guide/topics/ui/index.

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

Chapter 11 Paper Practice

UI Fragment.

CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu

Introductory Mobile App Development

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

Fragments. Lecture 10

Adapter.

Mobile and Ubiquitous Computing: Android Programming (part 3)

Fragments. Lecture 11

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

Creating a Custom ListView

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Theme 2 Program Design. MVC and MVP

Graphical User Interfaces

ListView (link) An ordered collection of selectable choices. key attributes in XML:

Chapter 7: Reveal! Displaying Pictures in a Gallery

Fragments. Fragments may only be used as part of an ac5vity and cannot be instan5ated as standalone applica5on elements.

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Android Activities. Akhilesh Tyagi

INTRODUCTION TO ANDROID

States of Activities. Active Pause Stop Inactive

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

Android User Interface

O X X X O O X O X. Tic-Tac-Toe. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 2: The Ultimate Tic-Tac-Toe Game

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

Inheritance. Lecture 11 COP 3252 Summer May 25, 2017

Mobile Application Development Android

Android User Interface Android Smartphone Programming. Outline University of Freiburg

Inheritance. Transitivity

CS378 -Mobile Computing. More UI -Part 2

Open Lecture Mobile Programming. Intro to Material Design

Mobile Application Programing: Android. View Persistence

Android Navigation Drawer for Sliding Menu / Sidebar

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

Views & View Events View Groups, AdapterViews & Layouts Menus & ActionBar Dialogs

CMSC436: Fall 2013 Week 3 Lab

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

Building User Interface for Android Mobile Applications II

Lecture 13 Mobile Programming. Google Maps Android API

Teaching materials and advanced sample applications for Android platform

14.1 Overview of Android

Lifecycle-Aware Components Live Data ViewModel Room Library

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

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

Lab 1: Getting Started With Android Programming

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

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based.

Document Plan. Social Media Geolocation App. Robert McCaffrey, Matt Feld, Taylor Neal, David Kwon BLIPME

android:layout_margintop="5dp" > <EditText android:layout_width="210dp"

public static boolean isoutside(int min, int max, int value)

Mobile User Interfaces

Overview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

Android Programming Lecture 2 9/7/2011

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

Overview of Activities

CS1 Studio Project: Connect Four

Orientation & Localization

Meniu. Create a project:

INHERITANCE. Spring 2019

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

Mobile Application Development

Understanding Application

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

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Transcription:

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 Class Feed... 7 title... 8 desc... 8 image... 8 isonline... 9 Feed... 9 Feed... 9 gettitle... 9 settitle... 9 getdesc... 10 setdesc... 10 getimage... 10 setimage... 10 isonline... 10 setonline... 11 com.taxi.ui Class LeftNavAdapter... 11 items... 12 context... 12 isfirst... 12 LeftNavAdapter... 12

getcount... 13 getitem... 13 getitemid... 13 getview... 13 com.taxi Class MainActivity... 13 drawerlayout... 15 drawerleft... 15 drawerright... 16 drawertoggle... 16 MainActivity... 16 oncreate... 16 setupactionbar... 16 setupdrawer... 16 setupleftnavdrawer... 16 setuprightnavdrawer... 17 setupcontainer... 17 onpostcreate... 17 onconfigurationchanged... 17 oncreateoptionsmenu... 17 onprepareoptionsmenu... 17 onoptionsitemselected... 17 onkeydown... 18 com.taxi.ui Class MainFragment... 18 mmapview... 20 mmap... 20 MainFragment... 20 oncreateview... 20 initbuttons... 20 initmap... 20 setupmapmarkers... 21 onresume... 21 onpause... 21

ondestroy... 21 onlowmemory... 21 onsaveinstancestate... 21 onclick... 21 com.taxi Class PaymentPopup... 22 PaymentPopup... 23 oncreate... 23 setupview... 23 onclick... 23 com.taxi.ui Class RightNavAdapter... 24 items... 25 context... 25 RightNavAdapter... 25 getcount... 25 getitem... 25 getitemid... 26 getview... 26 com.taxi.ui Class SearchDialog... 26 count... 27 tab... 27 SearchDialog... 27 show... 28 build... 28 setupviewcomponents... 28 onclick... 28 com.taxi.utils Class TouchEffect... 29 TouchEffect... 29 ontouch... 29 com.taxi.ui Class CallDialog

java.lang.object SimpleDialogFragment com.taxi.ui.calldialog public class CallDialog extends SimpleDialogFragment The Class CallDialog creates the dialog fragment for Call section of this application. This class uses 3rd party open source library to Style the Dialog. Currently this will styled to show the Yellow separator for title of Dialog. You can utilize this open source library to give more styled theme for your dialogs. Constructor Summary CallDialog() Constructor and Description Method Summary Method and Description BaseDialogFragment.Builder build(basedialogfragment.builder builder) static void show(fragmentactivity activity) This static method is used to show the CallDialog fragment. Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Constructor Detail CallDialog public CallDialog() Method Detail show

public static void show(fragmentactivity activity) This static method is used to show the CallDialog fragment. activity - the activity in which this fragment dialog will appear. build public BaseDialogFragment.Builder build(basedialogfragment.builder builder) com.taxi.custom Class CustomActivity java.lang.object FragmentActivity com.taxi.custom.customactivity Direct Known Subclasses: MainActivity, PaymentPopup public class CustomActivity extends FragmentActivity This is a common activity that all other activities of the app can extend to inherit the common behaviors like setting a Theme to activity. Field Summary Field and Description static TouchEffect TOUCH Apply this Constant as touch listener for views to provide alpha touch effect. Constructor Summary CustomActivity() Constructor and Description

Method Summary Method and Description void onclick(view v) boolean onoptionsitemselected(menuitem item) Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail TOUCH public static final TouchEffect TOUCH Apply this Constant as touch listener for views to provide alpha touch effect. The view must have a Non-Transparent background. Constructor Detail CustomActivity public CustomActivity() Method Detail onoptionsitemselected public boolean onoptionsitemselected(menuitem item) onclick public void onclick(view v)

com.taxi.model Class Feed java.lang.object com.taxi.model.feed public class Feed extends java.lang.object The Class Feed is a simple Java Bean that is used to hold Name, Detail and image pairs. Field Summary private java.lang.string desc The description. Field and Description private int image The image resource id. private boolean isonline The is online. private java.lang.string title The title. Constructor Summary Constructor and Description Feed(java.lang.String title, java.lang.string desc, int image) Instantiates a new feed class. Feed(java.lang.String title, java.lang.string desc, int image, boolean online) Instantiates a new feed. Method Summary Method and Description

java.lang.string getdesc() Gets the description. int getimage() Gets the image resource id.. java.lang.string gettitle() Gets the title. boolean isonline() Checks if is online. void setdesc(java.lang.string desc) Sets the description. void setimage(int image) Sets the image resource id.. void setonline(boolean isonline) Sets the online. void settitle(java.lang.string title) Sets the title. Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail title private java.lang.string title The title. desc private java.lang.string desc The description. image private int image The image resource id.

isonline private boolean isonline The is online. Constructor Detail Feed public Feed(java.lang.String title, java.lang.string desc, int image) Instantiates a new feed class. title - the title desc - the desc image - the image Feed public Feed(java.lang.String title, java.lang.string desc, int image, boolean online) Instantiates a new feed. title - the title desc - the desc image - the image online - the online Method Detail gettitle public java.lang.string gettitle() Gets the title. Returns: the title settitle

public void settitle(java.lang.string title) Sets the title. title - the new title getdesc public java.lang.string getdesc() Gets the description. Returns: the description setdesc public void setdesc(java.lang.string desc) Sets the description. desc - the new description getimage public int getimage() Gets the image resource id.. Returns: the image resource id. setimage public void setimage(int image) Sets the image resource id.. image - the new image resource id. isonline public boolean isonline() Checks if is online. Returns: true, if is online

setonline public void setonline(boolean isonline) Sets the online. isonline - the new online com.taxi.ui Class LeftNavAdapter java.lang.object BaseAdapter com.taxi.ui.leftnavadapter public class LeftNavAdapter extends BaseAdapter The Adapter class for the ListView displayed in the left navigation drawer. Field Summary Field and Description private Context context The context. private boolean isfirst The is first. private java.util.arraylist<feed> items The items. Constructor Summary Constructor and Description LeftNavAdapter(Context context, java.util.arraylist<feed> items)

Instantiates a new left navigation adapter. Method Summary int getcount() Method and Description Feed getitem(int arg0) long getitemid(int position) View getview(int position, View convertview, ViewGroup parent) Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail items private java.util.arraylist<feed> items The items. context private Context context The context. isfirst private boolean isfirst The is first. Constructor Detail LeftNavAdapter

public LeftNavAdapter(Context context, java.util.arraylist<feed> items) Instantiates a new left navigation adapter. context - the context of activity items - the array of items to be displayed on ListView Method Detail getcount public int getcount() getitem public Feed getitem(int arg0) getitemid public long getitemid(int position) getview public View getview(int position, View convertview, ViewGroup parent) com.taxi Class MainActivity java.lang.object FragmentActivity com.taxi.custom.customactivity com.taxi.mainactivity

public class MainActivity extends CustomActivity The Activity MainActivity will launched at the start of the app. Field Summary private DrawerLayout drawerlayout The drawer layout. Field and Description private ListView drawerleft ListView for left side drawer. private ListView drawerright ListView for left side drawer. private ActionBarDrawerToggle drawertoggle The drawer toggle. Fields inherited from class com.taxi.custom.customactivity TOUCH Constructor Summary MainActivity() Constructor and Description Method Summary Method and Description void onconfigurationchanged(configuration newconfig) protected void oncreate(bundle savedinstancestate) boolean oncreateoptionsmenu(menu menu) boolean onkeydown(int keycode, KeyEvent event)

boolean onoptionsitemselected(menuitem item) protected void onpostcreate(bundle savedinstancestate) boolean onprepareoptionsmenu(menu menu) protected void setupactionbar() This method will setup the top title bar (Action bar) content and display values. private void setupcontainer() Setup the container fragment for drawer layout. private void setupdrawer() Setup the drawer layout. private void setupleftnavdrawer() Setup the left navigation drawer/slider. private void setuprightnavdrawer() Setup the right navigation drawer/slider. Methods inherited from class com.taxi.custom.customactivity onclick Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail drawerlayout private DrawerLayout drawerlayout The drawer layout. drawerleft private ListView drawerleft ListView for left side drawer.

drawerright private ListView drawerright ListView for left side drawer. drawertoggle private ActionBarDrawerToggle drawertoggle The drawer toggle. Constructor Detail MainActivity public MainActivity() Method Detail oncreate protected void oncreate(bundle savedinstancestate) setupactionbar protected void setupactionbar() This method will setup the top title bar (Action bar) content and display values. It will also setup the custom background theme for ActionBar. You can override this method to change the behavior of ActionBar for particular Activity setupdrawer private void setupdrawer() Setup the drawer layout. This method also includes the method calls for setting up the Left & Right side drawers. setupleftnavdrawer private void setupleftnavdrawer() Setup the left navigation drawer/slider. You can add your logic to load the contents to be displayed on the left side drawer. It will also setup the Header

and Footer contents of left drawer. This method also apply the Theme for components of Left drawer. setuprightnavdrawer private void setuprightnavdrawer() Setup the right navigation drawer/slider. You can add your logic to load the contents to be displayed on the right side drawer. It will also setup the Header contents of right drawer. setupcontainer private void setupcontainer() Setup the container fragment for drawer layout. This method will setup the grid view display of main contents. You can customize this method as per your need to display specific content. onpostcreate protected void onpostcreate(bundle savedinstancestate) onconfigurationchanged public void onconfigurationchanged(configuration newconfig) oncreateoptionsmenu public boolean oncreateoptionsmenu(menu menu) onprepareoptionsmenu public boolean onprepareoptionsmenu(menu menu) onoptionsitemselected public boolean onoptionsitemselected(menuitem item) Overrides: onoptionsitemselected in class CustomActivity

onkeydown public boolean onkeydown(int keycode, KeyEvent event) com.taxi.ui Class MainFragment java.lang.object Fragment com.taxi.ui.mainfragment public class MainFragment extends Fragment The Class MainFragment is the base fragment that shows the Google Map. You can add your code to do whatever you want related to Map functions for your app. For example you can add Map markers here or can show places on map. Nested Class Summary Class and Description private class MainFragment.CustomInfoWindowAdapter This class creates a Custom a InfoWindowAdapter that is used to show popup on map when user taps on a pin on the map. Field Summary Field and Description private GoogleMap mmap The Google map.

private MapView mmapview The map view. Constructor Summary MainFragment() Constructor and Description Method Summary Method and Description private void initbuttons(view v) Initialize the buttons and set the Touch and Click listner for each button of this view. private void initmap(view v, Bundle savedinstancestate) Initialize the Map view. void onclick(view v) View oncreateview(layoutinflater inflater, ViewGroup container, Bundle savedinstancestate) void ondestroy() void onlowmemory() void onpause() void onresume() void onsaveinstancestate(bundle outstate) private void setupmapmarkers() This method can be used to show the markers on the map. Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring,

wait, wait, wait Field Detail mmapview private MapView mmapview The map view. mmap private GoogleMap mmap The Google map. Constructor Detail MainFragment public MainFragment() Method Detail oncreateview public View oncreateview(layoutinflater inflater, ViewGroup container, Bundle savedinstancestate) initbuttons private void initbuttons(view v) Initialize the buttons and set the Touch and Click listner for each button of this view. You can add or change the buttons here. v - the v initmap private void initmap(view v, Bundle savedinstancestate) Initialize the Map view.

v - the v savedinstancestate - the saved instance state object passed from OnCreateView method of fragment. setupmapmarkers private void setupmapmarkers() This method can be used to show the markers on the map. Current implementation of this method will show only a single Pin with title and snippet. You must customize this method to show the pins as per your need. onresume public void onresume() onpause public void onpause() ondestroy public void ondestroy() onlowmemory public void onlowmemory() onsaveinstancestate public void onsaveinstancestate(bundle outstate) onclick public void onclick(view v)

com.taxi Class PaymentPopup java.lang.object FragmentActivity com.taxi.custom.customactivity com.taxi.paymentpopup public class PaymentPopup extends CustomActivity The Activity PaymentPopup is launched when user proceed for the payment of Taxi he/she want to book. Currently it will be launched when user tap on middle button located at the bottom of the Map screen. It will also launched when user click on Reserve button in Search dialog. You must customize and enhance this as per your needs. Field Summary Field and Description Fields inherited from class com.taxi.custom.customactivity TOUCH Constructor Summary PaymentPopup() Constructor and Description Method Summary void onclick(view v) Method and Description protected void oncreate(bundle savedinstancestate)

private void setupview() Setup the click & other events listeners for the view components of this screen. Methods inherited from class com.taxi.custom.customactivity onoptionsitemselected Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Constructor Detail PaymentPopup public PaymentPopup() Method Detail oncreate protected void oncreate(bundle savedinstancestate) setupview private void setupview() Setup the click & other events listeners for the view components of this screen. You can add your logic for Binding the data to TextViews and other views as per your need. onclick public void onclick(view v) Overrides: onclick in class CustomActivity

com.taxi.ui Class RightNavAdapter java.lang.object BaseAdapter com.taxi.ui.rightnavadapter public class RightNavAdapter extends BaseAdapter The Adapter class for the ListView displayed in the left navigation drawer. Field Summary Field and Description private Context context The context. private java.util.arraylist<feed> items The items. Constructor Summary Constructor and Description RightNavAdapter(Context context, java.util.arraylist<feed> items) Instantiates a new left navigation adapter. Method Summary int getcount() Method and Description Feed getitem(int arg0) long getitemid(int position)

View getview(int position, View convertview, ViewGroup parent) Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail items private java.util.arraylist<feed> items The items. context private Context context The context. Constructor Detail RightNavAdapter public RightNavAdapter(Context context, java.util.arraylist<feed> items) Instantiates a new left navigation adapter. context - the context of activity items - the array of items to be displayed on ListView Method Detail getcount public int getcount() getitem public Feed getitem(int arg0)

getitemid public long getitemid(int position) getview public View getview(int position, View convertview, ViewGroup parent) com.taxi.ui Class SearchDialog java.lang.object SimpleDialogFragment com.taxi.ui.searchdialog public class SearchDialog extends SimpleDialogFragment The Class SearchDialog creates the dialog fragment for Search section of this application. This class uses 3rd party open source library to Style the Dialog. Currently this will styled to show the Yellow separator for title of Dialog. You can utilize this open source library to give more styled theme for your dialogs. Field Summary Field and Description private View count The count variable holds the current tab selected for count tab private View tab group. The variable holds the current tab selected for payment option tab group..

Constructor Summary SearchDialog() Constructor and Description Method Summary Method and Description BaseDialogFragment.Builder build(basedialogfragment.builder builder) Builds the dialog fragment. void onclick(view v) Called when a view has been clicked. private void setupviewcomponents(view v) Set up the view components. static void show(fragmentactivity activity) This static method is used to show the SearchDialog fragment. Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Field Detail count private View count The count variable holds the current tab selected for count tab group. tab private View tab The variable holds the current tab selected for payment option tab group.. Constructor Detail SearchDialog

public SearchDialog() Method Detail show public static void show(fragmentactivity activity) This static method is used to show the SearchDialog fragment. activity - the activity in which this fragment dialog will appear. build public BaseDialogFragment.Builder build(basedialogfragment.builder builder) Builds the dialog fragment. builder - the builder Returns: the base dialog fragment builder setupviewcomponents private void setupviewcomponents(view v) Set up the view components. v - the parent view container. onclick public void onclick(view v) Called when a view has been clicked. Specified by: onclick(...) in OnClickListener v - the view that was clicked

com.taxi.utils Class TouchEffect java.lang.object com.taxi.utils.toucheffect public class TouchEffect extends java.lang.object The Class TouchEffect. Constructor Summary TouchEffect() Constructor and Description Method Summary Method and Description boolean ontouch(view v, MotionEvent event) Methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait Constructor Detail TouchEffect public TouchEffect() Method Detail ontouch public boolean ontouch(view v, MotionEvent event)