Esempio n. 1
0
        private void A1_FocusChanged(object sender, FocusManager.FocusChangedEventArgs e)
        {
            View v1 = e.CurrentView;

            e.CurrentView = v1;

            View v2 = e.NextView;

            e.NextView = v2;
        }
Esempio n. 2
0
        async void OnFocusChanged(object?sender, FocusManager.FocusChangedEventArgs e)
        {
            if (e.Current == null)
            {
                return;
            }

            if (DrawerViewGroup.FindDescendantByID(e.Current.ID) != null)
            {
                await OpenAsync(true);
            }
            else if (ContentViewGroup.FindDescendantByID(e.Current.ID) != null)
            {
                await CloseAsync(true);
            }
        }
Esempio n. 3
0
        public void FocusManagerFocusChanged()
        {
            tlog.Debug(tag, $"FocusManagerFocusChanged START");
            FocusManager a1 = FocusManager.Instance;

            a1.FocusChanged += A1_FocusChanged;
            a1.FocusChanged -= A1_FocusChanged;

            object o1 = new object();

            FocusManager.FocusChangedEventArgs e = new FocusManager.FocusChangedEventArgs();
            A1_FocusChanged(o1, e);

            tlog.Debug(tag, $"FocusManagerFocusChanged END (OK)");
            Assert.Pass("FocusManagerFocusChanged");
        }
Esempio n. 4
0
    private void OnFocusChanged(object source, FocusManager.FocusChangedEventArgs e)
    {
        Console.WriteLine("Focus Changed");

        Animation scaleAnimation = new Animation();

        scaleAnimation.Duration = 300;
        if (e.CurrentView)
        {
            TextLabel currentFocusedButton = (TextLabel)(e.CurrentView);
            scaleAnimation.AnimateTo(currentFocusedButton, "Scale", new Size(1.0f, 1.0f, 1.0f));
            scaleAnimation.AnimateTo(currentFocusedButton, "TextColor", new Color(0.61f, 0.59f, 0.64f, 1.0f));
        }
        if (e.NextView)
        {
            TextLabel nextFocusedButton = (TextLabel)(e.NextView);
            scaleAnimation.AnimateTo(nextFocusedButton, "Scale", new Size(1.12f, 1.12f, 1.12f));
            scaleAnimation.AnimateTo(nextFocusedButton, "TextColor", Color.White);
        }
        scaleAnimation.Play();
    }
Esempio n. 5
0
 private void CategoryChanged(object source, FocusManager.FocusChangedEventArgs e)
 {
     Console.WriteLine("CategoryChanged");
 }