Esempio n. 1
0
        Rect GetAbsCoordinates()
        {
            // Must offset the boundaries so they're relative to the CustomView.
            int[] offset = new int[2];
            CustomVirtualView.GetLocationOnScreen(offset);
            Rect absBounds = new Rect(Bounds.Left + offset[0],
                                      Bounds.Top + offset[1],
                                      Bounds.Right + offset[0], Bounds.Bottom + offset[1]);

            Log.Verbose(Tag, "getAbsCoordinates() for " + FieldTextItem.Id + ": bounds=" + Bounds
                        + " offset: " + Arrays.ToString(offset) + " absBounds: " + absBounds);
            return(absBounds);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.virtual_login_activity);
            CustomVirtualView = (CustomVirtualView)FindViewById(Resource.Id.custom_view);

            FindViewById(Resource.Id.login).Click += (sender, e) => {
                Login();
            };
            FindViewById(Resource.Id.clear).Click += (sender, e) => {
                ResetFields();
            };
            AutofillManager = (AutofillManager)ApplicationContext.GetSystemService(Java.Lang.Class.FromType(typeof(AutofillManager)));
        }