public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { // Currently in a layout without a container, so no reason to create our view. return(null); } JoinGroupView = new UIJoinGroup(); View view = inflater.Inflate(Resource.Layout.JoinGroup, container, false); view.SetOnTouchListener(this); view.SetBackgroundColor(Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color)); RelativeLayout backgroundView = view.FindViewById <RelativeLayout>(Resource.Id.view_background); JoinGroupView.Create(backgroundView, new System.Drawing.RectangleF(0, 0, NavbarFragment.GetCurrentContainerDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels)); // get the native object types so we can hook in necessary support pointers ((View)JoinGroupView.View.PlatformNativeObject).SetOnTouchListener(this); ((EditText)JoinGroupView.CellPhone.PlatformNativeObject).AddTextChangedListener(new PhoneNumberFormattingTextWatcher()); return(view); }
public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BackgroundColor); ScrollView = new UIScrollViewWrapper(); ScrollView.Layer.AnchorPoint = CGPoint.Empty; ScrollView.Parent = this; ScrollView.Bounds = View.Bounds; View.AddSubview(ScrollView); KeyboardAdjustManager = new KeyboardAdjustManager(View); JoinGroupView = new UIJoinGroup(); JoinGroupView.Create(ScrollView, View.Frame.ToRectF( )); UITextField spouseName = (UITextField)JoinGroupView.SpouseName.PlatformNativeObject; spouseName.Delegate = new KeyboardAdjustManager.TextFieldDelegate( ); UITextField emailName = (UITextField)JoinGroupView.Email.PlatformNativeObject; emailName.Delegate = new KeyboardAdjustManager.TextFieldDelegate( ); // since we're using the platform UI, we need to manually hook up the phone formatting delegate, // because that isn't implemented in platform abstracted code. CellPhoneTextField = (UITextField)JoinGroupView.CellPhone.PlatformNativeObject; CellPhoneTextField.Delegate = new Rock.Mobile.PlatformSpecific.iOS.UI.PhoneNumberFormatterDelegate(); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { // Currently in a layout without a container, so no reason to create our view. return null; } JoinGroupView = new UIJoinGroup(); View view = inflater.Inflate(Resource.Layout.JoinGroup, container, false); view.SetOnTouchListener( this ); view.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_Color ) ); RelativeLayout backgroundView = view.FindViewById<RelativeLayout>( Resource.Id.view_background ); JoinGroupView.Create( backgroundView, new System.Drawing.RectangleF( 0, 0, NavbarFragment.GetContainerDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels ) ); // get the native object types so we can hook in necessary support pointers ((View)JoinGroupView.View.PlatformNativeObject).SetOnTouchListener( this ); ((EditText)JoinGroupView.CellPhone.PlatformNativeObject).AddTextChangedListener(new PhoneNumberFormattingTextWatcher()); return view; }