Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

A regression bug in 7.2.1?

$
0
0

Hi,

In my UI, I have a series of textfields. When I click in these under 7.2.0, I could get a UIPickerView to come up without the keyboard. With 7.2.1. the keyboard and UIPickerView shows.

The code I'm using is this

To call the picker view

txtImplement.EditingDidBegin += delegate
{
    var impl = ClassUtils.GetImplementList;
    PickerUI.CreateDropList(View, new UIPickerView, txtImplement, impl);
};

The PickerUI.CreateDropList method looks like this

public static void CreateDropList(UIView view, UIPickerView picker, UITextField txtField, List<string> param)
{
     var choiceModel = new PickerModel((IList<string>)param);
     string imp = param[0];
     picker = new UIPickerView
     {
          Model = choiceModel,
          BackgroundColor = UIColor.Clear,
          ShowSelectionIndicator = true,
          Hidden = false,
          AutosizesSubviews = true,
          Frame = new RectangleF(0, 100, AppDelegate.Self.ScreenX, 162),
     };
     var action = new UIActionSheet
     {
          Style = UIActionSheetStyle.BlackTranslucent,
     };
     var toolHigh = new UIToolbar
     {
          BarStyle = UIBarStyle.Black,
          Translucent = true,
     };
     toolHigh.SizeToFit();
     var doneHigh = new UIBarButtonItem(StringUtils.GetString("Common.Done"), UIBarButtonItemStyle.Done,
                               (ss, ea) =>
     {
          action.DismissWithClickedButtonIndex(0, true);
          picker.ResignFirstResponder();
          txtField.Text = imp;
          txtField.ResignFirstResponder();
     });
     toolHigh.SetItems(new UIBarButtonItem[] { doneHigh }, true);
     action.ShowInView(view);
     action.AddSubview(toolHigh);
     action.AddSubview(picker);
     action.Frame = new RectangleF(0, 100, 320, 500);
     picker.Frame = new RectangleF(action.Frame.X, action.Frame.Y - 25, action.Frame.Width, 216);
     choiceModel.PickerChanged += (object sender, PickerChangedEventArgs ea) =>
     {
           imp = ea.SelectedValue;
     };
}

As I say, works fine under 7.2.0, keyboard and spinner show in 7.2.1

Any ideas on why this is happening and if there is a way to stop the keyboard from showing when I click into the textfield?

Paul


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>