Example #1
0
        public FloatingWidgetExpandedController(FloatingWidgetService service, CarrierSideActiveRouteViewModel viewModel)
        {
            this.service   = service;
            this.viewModel = viewModel;

            this.currentPoint = this.viewModel.Points.Where(x => x.Active).FirstOrDefault();

            var expandedView = service.mFloatingView.FindViewById(Resource.Id.floating_widget_layout_expanded);

            pointIndex      = expandedView.FindViewById <TextView>(Resource.Id.widget_current_index);
            pointTypeHeader = expandedView.FindViewById <TextView>(Resource.Id.widget_point_type);
            pointTypeIcon   = expandedView.FindViewById <ImageView>(Resource.Id.widget_point_type_icon);
            pointAddress    = expandedView.FindViewById <TextView>(Resource.Id.widget_point_address);

            passedTimeText  = expandedView.FindViewById <TextView>(Resource.Id.widget_passed_time_text);
            passedContainer = expandedView.FindViewById <LinearLayout>(Resource.Id.widget_passed_time_container);

            //buttons
            nextPointButton        = expandedView.FindViewById <ImageButton>(Resource.Id.widget_next_point_button);
            nextPointButton.Click += NextPointClick;

            previousPointButton        = expandedView.FindViewById <ImageButton>(Resource.Id.widget_previous_point_button);
            previousPointButton.Click += PreviousPointClick;


            controlButtonsContainer = expandedView.FindViewById <LinearLayout>(Resource.Id.widget_control_buttons_container);

            showAppButton        = expandedView.FindViewById <Button>(Resource.Id.widget_show_app_button);
            showAppButton.Click += ShowAppClick;

            gmapsIntentButton        = expandedView.FindViewById <Button>(Resource.Id.widget_set_gmaps_button);
            gmapsIntentButton.Click += GmapsNavigationClick;
        }
 public FloatingWidgetBinder(FloatingWidgetService service)
 {
     this.service = service;
 }