示例#1
0
			public RentalsAdapter (Context context)
			{
				this.context = context;
				bikeSeparatorDrawable = SvgFactory.GetDrawable (context.Resources,
				                                                Resource.Raw.bike_separator);
			}
示例#2
0
		public override void OnViewCreated (View view, Bundle savedInstanceState)
		{
			base.OnViewCreated (view, savedInstanceState);

			// Default map initialization
			mapFragment.Map.MyLocationEnabled = true;
			mapFragment.Map.MapType = GoogleMap.MapTypeNormal;
			mapFragment.Map.UiSettings.MyLocationButtonEnabled = false;
			mapFragment.Map.UiSettings.ZoomControlsEnabled = false;
			mapFragment.Map.UiSettings.CompassEnabled = false;
			mapFragment.Map.UiSettings.RotateGesturesEnabled = false;
			mapFragment.Map.UiSettings.TiltGesturesEnabled = false;
			mapFragment.Map.MoveCamera (CameraUpdateFactory.NewLatLngZoom (
				new LatLng (42.366031, -71.071405),
				13
			));

			mapFragment.Map.MarkerClick += HandleMarkerClick;
			mapFragment.Map.MapClick += HandleMapClick;
			var oldPosition = PreviousCameraPosition;
			if (oldPosition != null)
				mapFragment.Map.MoveCamera (CameraUpdateFactory.NewCameraPosition (oldPosition));

			// Setup info pane
			var bikeDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.bike);
			var lockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.ic_lock);
			var stationLockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.station_lock);
			var bikeNumberDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.bike_number);
			var clockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.clock);
			starOnDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_on);
			starOffDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_off);
			pane.FindViewById<ImageView> (Resource.Id.bikeImageView).SetImageDrawable (bikeDrawable);
			pane.FindViewById<ImageView> (Resource.Id.lockImageView).SetImageDrawable (lockDrawable);
			pane.FindViewById<ImageView> (Resource.Id.stationLock).SetImageDrawable (stationLockDrawable);
			pane.FindViewById<ImageView> (Resource.Id.bikeNumberImg).SetImageDrawable (bikeNumberDrawable);
			pane.FindViewById<ImageView> (Resource.Id.clockImg).SetImageDrawable (clockDrawable);
			var starBtn = pane.FindViewById<ImageButton> (Resource.Id.StarButton);
			starBtn.Click += HandleStarButtonChecked;
			streetViewFragment.StreetViewPanorama.UserNavigationEnabled = false;
			streetViewFragment.StreetViewPanorama.StreetNamesEnabled = false;
			streetViewFragment.StreetViewPanorama.StreetViewPanoramaClick += HandleMapButtonClick;
		}
示例#3
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);

            view.SetBackgroundDrawable(AndroidExtensions.DefaultBackground);

            mapFragment?.GetMapAsync(this);



		
            // Setup info pane
            SetSvgImage(pane, Resource.Id.bikeImageView, Resource.Raw.bike);
            SetSvgImage(pane, Resource.Id.lockImageView, Resource.Raw.ic_lock);
            SetSvgImage(pane, Resource.Id.stationLock, Resource.Raw.station_lock);
            SetSvgImage(pane, Resource.Id.bikeNumberImg, Resource.Raw.bike_number);
            SetSvgImage(pane, Resource.Id.clockImg, Resource.Raw.clock);
            SetSvgImage(pane, Resource.Id.stationNotInstalled, Resource.Raw.not_installed);
            starOnDrawable = SvgFactory.GetDrawable(Resources, Resource.Raw.star_on);
            starOffDrawable = SvgFactory.GetDrawable(Resources, Resource.Raw.star_off);
            var starBtn = pane.FindViewById<ImageButton>(Resource.Id.StarButton);
            starBtn.Click += HandleStarButtonChecked;
            streetViewFragment?.GetStreetViewPanoramaAsync(this);
        }
示例#4
0
		public override void OnViewCreated (View view, Bundle savedInstanceState)
		{
			base.OnViewCreated (view, savedInstanceState);
			mapFragment.Map.MyLocationEnabled = true;
			mapFragment.Map.UiSettings.MyLocationButtonEnabled = false;
			mapFragment.Map.MarkerClick += HandleMarkerClick;
			mapFragment.Map.MapClick += HandleMapClick;
			var oldPosition = PreviousCameraPosition;
			if (oldPosition != null)
				mapFragment.Map.MoveCamera (CameraUpdateFactory.NewCameraPosition (oldPosition));

			// Setup info pane
			var bikeDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.bike);
			var lockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.ic_lock);
			var stationLockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.station_lock);
			var bikeNumberDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.bike_number);
			var clockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.clock);
			starOnDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_on);
			starOffDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_off);
			pane.FindViewById<ImageView> (Resource.Id.bikeImageView).SetImageDrawable (bikeDrawable);
			pane.FindViewById<ImageView> (Resource.Id.lockImageView).SetImageDrawable (lockDrawable);
			pane.FindViewById<ImageView> (Resource.Id.stationLock).SetImageDrawable (stationLockDrawable);
			pane.FindViewById<ImageView> (Resource.Id.bikeNumberImg).SetImageDrawable (bikeNumberDrawable);
			pane.FindViewById<ImageView> (Resource.Id.clockImg).SetImageDrawable (clockDrawable);
			var starBtn = pane.FindViewById<ImageButton> (Resource.Id.StarButton);
			starBtn.Click += HandleStarButtonChecked;
			var mapBtn = pane.FindViewById (Resource.Id.gmapsBtn);
			mapBtn.Click += HandleMapButtonClick;
		}
示例#5
0
		public override void OnViewCreated (View view, Bundle savedInstanceState)
		{
			base.OnViewCreated (view, savedInstanceState);
			mapFragment.Map.MyLocationEnabled = true;
			mapFragment.Map.UiSettings.MyLocationButtonEnabled = false;
			mapFragment.Map.MarkerClick += HandleMarkerClick;
			mapFragment.Map.MapClick += HandleMapClick;
			var oldPosition = PreviousCameraPosition;
			if (oldPosition != null)
				mapFragment.Map.MoveCamera (CameraUpdateFactory.NewCameraPosition (oldPosition));

			// Setup info pane
			var bikeDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.bike);
			var lockDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.ic_lock);
			var mapDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.map);
			starOnDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_on);
			starOffDrawable = SvgFactory.GetDrawable (Resources, Resource.Raw.star_off);
			pane.FindViewById<ImageView> (Resource.Id.bikeImageView).SetImageDrawable (bikeDrawable);
			pane.FindViewById<ImageView> (Resource.Id.lockImageView).SetImageDrawable (lockDrawable);
			var starBtn = pane.FindViewById<ImageButton> (Resource.Id.StarButton);
			starBtn.Click += HandleStarButtonChecked;
			var mapBtn = pane.FindViewById<Button> (Resource.Id.gmapsBtn);
			mapDrawable.SetBounds (0, 0, 32.ToPixels (), 32.ToPixels ());
			mapBtn.SetCompoundDrawables (mapDrawable, null, null, null);
			mapBtn.CompoundDrawablePadding = 6.ToPixels ();
			mapBtn.Click += HandleMapButtonClick;
		}