Samsung / Tizen.CircularUI

Tizen Wearable CircularUI project is to develop an open source software motivate software developer to creating Tizen Wearable Xamarin Forms app more easily and efficiently.
Other
80 stars 32 forks source link

CircleSliderSurfaceItem can not hide #281

Closed guangoon closed 4 years ago

guangoon commented 4 years ago

Describe the bug when Enter a page, we need slider is invisible, and press volume button, the slider is visible. but slider always visible. <views:CirclePageEx x:Name="PlaybackPage" x:Class="VoiceMemo.Views.PlayBackPage" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:converters="clr-namespace:VoiceMemo.Converters;" xmlns:views="clr-namespace:VoiceMemo.Views;" xmlns:vm="clr-namespace:VoiceMemo.ViewModels;" xmlns:w="clr-namespace:Tizen.Wearable.CircularUI.Forms;assembly=Tizen.Wearable.CircularUI.Forms" RotaryFocusObject="{x:Reference VolumeProgress}">

**To Reproduce** Steps to reproduce the behavior: 1. Go to play record page. 2. Click volume button 4. See error **Expected behavior** when enter play record page. slider is hide.and press volume button slider is visible. **Screenshots** If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - Target Product [Galaxy Watch,] - Tizen Platform Version [Tizen5.5] - Tizen.CircularUI Version [1.5.0] **Additional context** Add any other context about the problem here.
jkpu commented 4 years ago

You set RotaryFocusObject="{x:Reference VolumeProgress} . this mean display volumeProgress slider. If you want to hide volumeProgress slider. you don't set RotaryFocusObject when enter page. you should set RotaryFocusObject when user press volume button.

following code is example, OnClick is click event of volume button

        void OnClick(object sender, EventArgs args)
        {
                RotaryFocusObject = VolumeProgress;

        }

Or, you can binding RotaryFocus object (e.g RotaryFocusTarget, you set this value in code )

<views:CirclePageEx
    x:Name="PlaybackPage"
   x:Class="VoiceMemo.Views.PlayBackPage"
   xmlns="http://xamarin.com/schemas/2014/forms"
   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
   xmlns:converters="clr-namespace:VoiceMemo.Converters;"
   xmlns:views="clr-namespace:VoiceMemo.Views;"
   xmlns:vm="clr-namespace:VoiceMemo.ViewModels;"
   xmlns:w="clr- namespace:Tizen.Wearable.CircularUI.Forms;assembly=Tizen.Wearable.CircularUI.Forms"
    RotaryFocusObject="{Binding RotaryFocusTarget}">
        void OnClick(object sender, EventArgs args)
        {
                RotaryFocusTarget  = VolumeProgress;

        }