Пример #1
0
        public static void CreateStepperButtons <TButton>(IStepperHandler handler, out TButton?downButton, out TButton?upButton)
            where TButton : AButton
        {
            downButton           = (TButton)handler.CreateButton();
            downButton.Focusable = true;

            upButton           = (TButton)handler.CreateButton();
            upButton.Focusable = true;

            downButton.Gravity = GravityFlags.Center;
            downButton.Tag     = new StepperHandlerHolder(handler);
            downButton.SetOnClickListener(StepperListener.Instance);

            upButton.Gravity = GravityFlags.Center;
            upButton.Tag     = new StepperHandlerHolder(handler);
            upButton.SetOnClickListener(StepperListener.Instance);

            // IMPORTANT:
            // Do not be decieved. These are NOT the same characters. Neither are a "minus" either.
            // The Text is a visually pleasing "minus", and the description is the phonetically correct "minus".
            // The little key on your keyboard is a dash/hyphen.
            downButton.Text = "-";
            downButton.ContentDescription = "−";

            // IMPORTANT:
            // Do not be decieved. These are NOT the same characters.
            // The Text is a visually pleasing "plus", and the description is the phonetically correct "plus"
            // (which, unlike the minus, IS found on your keyboard).
            upButton.Text = "+";
            upButton.ContentDescription = "+";

            downButton.NextFocusForwardId = upButton.Id;
        }
Пример #2
0
 public StepperHandlerHolder(IStepperHandler handler)
 {
     StepperHandler = handler;
 }
Пример #3
0
 public static void MapValue(IStepperHandler handler, IStepper stepper)
 {
     handler.PlatformView?.UpdateValue(stepper);
 }
Пример #4
0
 public static void MapIncrement(IStepperHandler handler, IStepper stepper)
 {
     handler.PlatformView?.UpdateIncrement(stepper);
 }
Пример #5
0
 public static void MapMaximum(IStepperHandler handler, IStepper stepper)
 {
     handler.PlatformView?.UpdateMaximum(stepper);
 }
Пример #6
0
 public static void MapBackground(IStepperHandler handler, IStepper view)
 {
     handler.PlatformView?.UpdateBackground(view);
 }