C# Class EasyBike.Droid.MainActivity

Inheritance: IOnMapReadyCallback, Android.Support.V7.View.ActionMode.ICallback, ClusterManager.IOnClusterClickListener, ClusterManager.IOnClusterItemClickListener
Show file Open project: ThePublicBikeGang/EasyBike Class Usage Examples

Public Properties

Property Type Description
ActionMode Android.Support.V7.View.ActionMode
Items List
MapIsTouched bool
StationControls List
_stickToUserLocation bool
cts System.Threading.CancellationTokenSource

Public Methods

Method Description
CloseDrawer ( ) : void
DisableCompass ( ) : void
EndPlacesSearch ( ) : void
GetDirectionsAsync ( ) : Task
OnActionItemClicked ( Android.Support.V7.View.ActionMode mode, IMenuItem item ) : bool
OnBackPressed ( ) : void
OnClusterClick ( ICluster cluster ) : bool

disabled by _map_MarkerClick :/

OnClusterItemClick ( Java marker ) : bool

disabled by _map_MarkerClick :/

OnConfigurationChanged ( Configuration newConfig ) : void
OnCreateActionMode ( Android.Support.V7.View.ActionMode mode, IMenu menu ) : bool
OnCreateOptionsMenu ( IMenu menu ) : bool

This is the menu for the Toolbar/Action Bar to use

OnDestroyActionMode ( Android.Support.V7.View.ActionMode mode ) : void
OnMapReady ( Android.Gms.Maps.GoogleMap googleMap ) : void
OnPrepareActionMode ( Android.Support.V7.View.ActionMode mode, IMenu menu ) : bool
SetViewPoint ( Android.Gms.Maps.Model.CameraPosition cameraPosition, bool animated ) : void
UnStickUserLocation ( ) : void

Protected Methods

Method Description
OnActivityResult ( int requestCode, [ resultCode, Android.Content.Intent data ) : void

when return to the activity from another with parameters

OnCreate ( Bundle bundle ) : void
OnDestroy ( ) : void
OnNewIntent ( Android.Content.Intent intent ) : void
OnPause ( ) : void
OnPostCreate ( Bundle savedInstanceState ) : void
OnResume ( ) : void

Private Methods

Method Description
AddDirectionsAsync ( ) : void
AddPlaceMarker ( Android.Gms.Maps.Model.LatLng position, string title, string snippet ) : void

add a marker for resolved adresses or map long click

AnimateStation ( Android.Gms.Maps.Model.Marker marker ) : void
AutoCompleteSearchPlaceTextView_ItemClick ( object sender, Android.Widget.AdapterView e ) : void
BikesButton_Click ( object sender, EventArgs e ) : void
CheckIfLocationIsActive ( ) : bool
ClearPolyline ( ) : void
CloseKeyboard ( ) : void
DecreaseButtonVisibility ( FloatingActionButton button ) : void
FormatLatLng ( Android.Gms.Maps.Model.LatLng position ) : string
FormatShareLocationMessage ( ) : string
GetAddressAsync ( ) : Task
GetDirectionsUrl ( Android.Gms.Maps.Model.LatLng origin, Android.Gms.Maps.Model.LatLng dest ) : string
GetPreviousLastUserLocation ( ) : void

when app launch before geolocator has found out the user location, set the last user location to what is in memory

GetStartingCameraPosition ( ) : Task

This is the menu for the Toolbar/Action Bar to use

IncreaseButtonVisibility ( FloatingActionButton button ) : void
LoadPreviousTile ( ) : void

Load the previous map tile choosen during last launch of the app

LocationButton_Click ( object sender, EventArgs e ) : void
Locator_PositionChanged ( object sender, Plugin e ) : void
OnContractRefreshed ( object sender, EventArgs e ) : void
OnStationRefreshed ( object sender, EventArgs e ) : void
ParkingButton_Click ( object sender, EventArgs e ) : void
ParseIntent ( Android.Content.Intent intent = null ) : void
RefreshStation ( Station station, Android.Gms.Maps.Model.Marker control ) : void
RefreshView ( AddRemoveCollection addRemoveCollection, CancellationToken token ) : void
ResetMapCameraViewAndStickers ( ) : void
SelectItem ( Android.Gms.Maps.Model.LatLng position ) : void

set the marke as the current marker and add directions

SetupMapIfNeeded ( ) : void
ShowIntentLocation ( ) : void
StartLocationTracking ( ) : void
SwitchModeStationParking ( ) : void

Switch between Parking view and Bike view

SwitchModeStationParkingVisualState ( ) : void

set the visual state of the bike/parking mode buttons

TileButton_Click ( object sender, EventArgs e ) : void
UpdateOverlay ( bool programatic = false ) : void
_createRouteIntent ( double latitude, double longitude ) : Android.Content.Intent
_createShareIntent ( ) : Android.Content.Intent
_currentTileNameAnimation_AnimationEnd ( object sender, Android.Views.Animations.Animation e ) : void
_map_MapClick ( object sender, Android.Gms.Maps.GoogleMap e ) : void
_map_MarkerClick ( object sender, Android.Gms.Maps.GoogleMap e ) : void

Method Details

CloseDrawer() public method

public CloseDrawer ( ) : void
return void

DisableCompass() public method

public DisableCompass ( ) : void
return void

EndPlacesSearch() public method

public EndPlacesSearch ( ) : void
return void

GetDirectionsAsync() public method

public GetDirectionsAsync ( ) : Task
return Task

OnActionItemClicked() public method

public OnActionItemClicked ( Android.Support.V7.View.ActionMode mode, IMenuItem item ) : bool
mode Android.Support.V7.View.ActionMode
item IMenuItem
return bool

OnActivityResult() protected method

when return to the activity from another with parameters
protected OnActivityResult ( int requestCode, [ resultCode, Android.Content.Intent data ) : void
requestCode int
resultCode [
data Android.Content.Intent
return void

OnBackPressed() public method

public OnBackPressed ( ) : void
return void

OnClusterClick() public method

disabled by _map_MarkerClick :/
public OnClusterClick ( ICluster cluster ) : bool
cluster ICluster
return bool

OnClusterItemClick() public method

disabled by _map_MarkerClick :/
public OnClusterItemClick ( Java marker ) : bool
marker Java
return bool

OnConfigurationChanged() public method

public OnConfigurationChanged ( Configuration newConfig ) : void
newConfig Configuration
return void

OnCreate() protected method

protected OnCreate ( Bundle bundle ) : void
bundle Bundle
return void

OnCreateActionMode() public method

public OnCreateActionMode ( Android.Support.V7.View.ActionMode mode, IMenu menu ) : bool
mode Android.Support.V7.View.ActionMode
menu IMenu
return bool

OnCreateOptionsMenu() public method

This is the menu for the Toolbar/Action Bar to use
public OnCreateOptionsMenu ( IMenu menu ) : bool
menu IMenu Menu.
return bool

OnDestroy() protected method

protected OnDestroy ( ) : void
return void

OnDestroyActionMode() public method

public OnDestroyActionMode ( Android.Support.V7.View.ActionMode mode ) : void
mode Android.Support.V7.View.ActionMode
return void

OnMapReady() public method

public OnMapReady ( Android.Gms.Maps.GoogleMap googleMap ) : void
googleMap Android.Gms.Maps.GoogleMap
return void

OnNewIntent() protected method

protected OnNewIntent ( Android.Content.Intent intent ) : void
intent Android.Content.Intent
return void

OnPause() protected method

protected OnPause ( ) : void
return void

OnPostCreate() protected method

protected OnPostCreate ( Bundle savedInstanceState ) : void
savedInstanceState Bundle
return void

OnPrepareActionMode() public method

public OnPrepareActionMode ( Android.Support.V7.View.ActionMode mode, IMenu menu ) : bool
mode Android.Support.V7.View.ActionMode
menu IMenu
return bool

OnResume() protected method

protected OnResume ( ) : void
return void

SetViewPoint() public method

public SetViewPoint ( Android.Gms.Maps.Model.CameraPosition cameraPosition, bool animated ) : void
cameraPosition Android.Gms.Maps.Model.CameraPosition
animated bool
return void

UnStickUserLocation() public method

public UnStickUserLocation ( ) : void
return void

Property Details

ActionMode public property

public Android.Support.V7.View.ActionMode ActionMode
return Android.Support.V7.View.ActionMode

Items public property

public List Items
return List

MapIsTouched public static property

public static bool MapIsTouched
return bool

StationControls public property

public List StationControls
return List

_stickToUserLocation public property

public bool _stickToUserLocation
return bool

cts public property

public CancellationTokenSource,System.Threading cts
return System.Threading.CancellationTokenSource