public static void CreateStepperButtons <TButton>(IAndroidStepperHandler 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; }
public StepperHandlerHolder(IAndroidStepperHandler handler) { StepperHandler = handler; }