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

Bezel rotation works incorrectly on ShellContent page with ToolBar Items #360

Open 091500 opened 3 years ago

091500 commented 3 years ago

Hello! I have the following simplified pages structure:

// shell section has multiple items, so that my page has an ability to display several screens: [Shell] [ShellItem] [ShellSection] [ShellContent Route="Photo" Title="Video" ContentTemplate="{DataTemplate views:PhotoCapturePage}"] [ShellContent Route="SlowVideo" Title="Video Lapse" ContentTemplate="{DataTemplate views:SlowVideoCapturePage}"]

// PhotoCapturePage contains a set of TollBar items. [ContentPage x:Class="CameraApp.Views.PhotoCapturePage"] [ContentPage.ToolbarItems] [ToolbarItem Text="Resolution" Order="Primary" Priority="0" Command="{Binding OpenSettingCommand}" CommandParameter="PhotoResolutions" ] [ToolbarItem Text="EV" Order="Primary" Priority="0" Command="{Binding OpenSettingCommand}" CommandParameter="EVs" ]

sorry for formatting, since github does not allow to render tags

The issue is that when I open a ToolBar on PhotoCapturePage and try to rotate Bezel (to scroll through my ToolBar items) - instead the page is navigated to items inside ShellSection. Bezel context is not bound to the ToolBar.

Expected Behavior: Bezel rotation on the opened ToolBar page scrolls between ToolBar items.

Tizen.Wearable.CircularUI version 1.5.0 Xamarin.Forms version 4.7.0 Tizen.Net 6.0.0

If that is no a bug, could you please give a hint how to fix the problem? Thank you.

rookiejava commented 3 years ago

/cc @shyunMin PTAL

shyunMin commented 3 years ago

Hello @091500, I'm sorry to check the issue too late. In the following case, since the objects that can be scrolled are nested, it may be a problem depending on the use case to determine the object to interact with bezel.

To prevent this problem, bezel rotation scrolls the item included in Shell preferentially as a default.

Thus, if you want to scroll the other object within the item of ShellSection using the bezel, you should set the object explicitly or set disable default behavior using BezelInteractionPage instead of ContentPage like below.

<w:BezelInteractionPage xmlns="http://xamarin.com/schemas/2014/forms"
                        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                        xmlns:w="clr-namespace:Tizen.Wearable.CircularUI.Forms;assembly=Tizen.Wearable.CircularUI.Forms"
                        x:Class="TizenWearableApp.PhotoCapturePage" >
    <ContentPage.ToolbarItems>
        <ToolbarItem
            Text="Resolution"
            Order="Primary"
            Priority="0" />
        <ToolbarItem
            Text="EV"
            Order="Primary"
            Priority="0"
            CommandParameter="EVs" />
    </ContentPage.ToolbarItems>
</w:BezelInteractionPage>

Please see BezelInteractionPage guide - https://samsung.github.io/Tizen.CircularUI/guide/BezelInteractionPage.html In this sample, bezel rotation scolls Toolbar items instead of ShellSection items. you can escape the BezelInteractionPage using swipe gesture.