From f6c2fa3cf523edd74d333ed0e6b7adc73f29c2f3 Mon Sep 17 00:00:00 2001 From: Seungkeun Lee Date: Wed, 29 Jan 2020 15:19:27 +0900 Subject: [PATCH] Add CircularShell (#226) * Implement CircualrShell * Fix Flyout behavior * Fix Crash issue on SimpleViewStack * Add Shell navigation example * [Shell] Fix Icon minimumsize of NavigationView (#215) * Fix Icon minimumsize of NavigationView * Update test apps * Update to lazy creation on ShellSectionItemsRenderer * Add NavigationDrawer (#221) * Add NavigationDrawer * Separate NaivgationDrawer from ShellRenderer * Update NavigationDrawer * Add NavigationDrawer.IconHeight * Update NavigationDrawer and ShellRenderer * Fix NavigationDrawer disappearing issue * Update NavigationDrawer to have shell item content * Update Drawer implement * Fix DeinitializeNavigationView * Add FlyoutExample sample * Optimzie on product binary * Update export renderer to support Xamarin.Forms.Shell Co-authored-by: shmin --- sample/ShellExamples/FlyoutExample/App.cs | 33 ++ .../ShellExamples/FlyoutExample/AppShell.xaml | 36 ++ .../FlyoutExample/AppShell.xaml.cs | 28 ++ .../FlyoutExample/ConfigPage.xaml | 16 + .../FlyoutExample/ConfigPage.xaml.cs | 45 ++ .../FlyoutExample/FlyoutExample.cs | 23 + .../FlyoutExample/FlyoutExample.csproj | 32 ++ .../FlyoutExample/FlyoutExample.sln | 37 ++ .../FlyoutExample/RandomColorPage.cs | 49 ++ .../FlyoutExample/SimplePage.xaml | 14 + .../FlyoutExample/SimplePage.xaml.cs | 29 ++ .../FlyoutExample/res/favorite.png | Bin 0 -> 339 bytes .../ShellExamples/FlyoutExample/res/home.png | Bin 0 -> 206 bytes .../ShellExamples/FlyoutExample/res/inbox.png | Bin 0 -> 229 bytes .../ShellExamples/FlyoutExample/res/play.png | Bin 0 -> 332 bytes .../ShellExamples/FlyoutExample/res/work.png | Bin 0 -> 179 bytes .../shared/res/FlyoutExample.png | Bin 0 -> 10097 bytes .../FlyoutExample/tizen-manifest.xml | 15 + sample/ShellExamples/ShellNavigation/App.cs | 35 ++ .../ShellNavigation/AppShell.xaml | 13 + .../ShellNavigation/AppShell.xaml.cs | 16 + .../ShellExamples/ShellNavigation/Main.xaml | 15 + .../ShellNavigation/Main.xaml.cs | 34 ++ .../ShellNavigation/Setting.xaml | 16 + .../ShellNavigation/Setting.xaml.cs | 39 ++ .../ShellNavigation/ShellNavigation.cs | 23 + .../ShellNavigation/ShellNavigation.csproj | 30 ++ .../ShellNavigation/ShellNavigation.sln | 37 ++ .../ShellNavigation/SubPage.xaml | 18 + .../ShellNavigation/SubPage.xaml.cs | 55 +++ .../shared/res/ShellNavigation.png | Bin 0 -> 10097 bytes .../ShellNavigation/tizen-manifest.xml | 15 + sample/ShellExamples/Xaminals/Metadata.xml | 11 + sample/ShellExamples/Xaminals/README.md | 23 + .../Xaminals/Screenshots/01All.png | Bin 0 -> 274846 bytes .../Xaminals/Screenshots/02All.png | Bin 0 -> 290399 bytes .../Xaminals/Screenshots/03All.png | Bin 0 -> 319881 bytes .../Xaminals/Screenshots/04All.png | Bin 0 -> 304874 bytes .../Xaminals/Screenshots/05All.png | Bin 0 -> 305492 bytes .../Xaminals/Screenshots/06All.png | Bin 0 -> 384441 bytes .../Xaminals/Screenshots/07All.png | Bin 0 -> 348628 bytes .../Xaminals/Screenshots/08All.png | Bin 0 -> 302552 bytes .../Xaminals/Screenshots/09All.png | Bin 0 -> 323864 bytes .../Xaminals/Screenshots/10All.png | Bin 0 -> 360313 bytes .../Xaminals/Xaminals.Tizen/Xaminals.Tizen.cs | 22 + .../Xaminals.Tizen/Xaminals.Tizen.csproj | 27 ++ .../Xaminals/Xaminals.Tizen/res/back.png | Bin 0 -> 1658 bytes .../Xaminals/Xaminals.Tizen/res/bear.png | Bin 0 -> 2505 bytes .../Xaminals/Xaminals.Tizen/res/cat.png | Bin 0 -> 2500 bytes .../Xaminals/Xaminals.Tizen/res/dog.png | Bin 0 -> 2900 bytes .../Xaminals/Xaminals.Tizen/res/elephant.png | Bin 0 -> 2758 bytes .../Xaminals/Xaminals.Tizen/res/help.png | Bin 0 -> 3160 bytes .../Xaminals/Xaminals.Tizen/res/info.png | Bin 0 -> 2867 bytes .../Xaminals/Xaminals.Tizen/res/monkey.png | Bin 0 -> 3073 bytes .../Xaminals/Xaminals.Tizen/res/paw.png | Bin 0 -> 2956 bytes .../Xaminals/Xaminals.Tizen/res/photo.jpg | Bin 0 -> 114121 bytes .../Xaminals/Xaminals.Tizen/res/random.png | Bin 0 -> 3346 bytes .../Xaminals.Tizen/res/xamarin_logo.png | Bin 0 -> 4250 bytes .../Xaminals.Tizen/res/xamarinstore.jpg | Bin 0 -> 16134 bytes .../shared/res/Xaminals.Tizen.png | Bin 0 -> 10097 bytes .../Xaminals.Tizen/tizen-manifest.xml | 15 + sample/ShellExamples/Xaminals/Xaminals.sln | 132 ++++++ .../ShellExamples/Xaminals/Xaminals/App.xaml | 76 ++++ .../Xaminals/Xaminals/App.xaml.cs | 31 ++ .../Xaminals/Xaminals/AppShell.xaml | 182 ++++++++ .../Xaminals/Xaminals/AppShell.xaml.cs | 85 ++++ .../Xaminals/Controls/AnimalSearchHandler.cs | 47 ++ .../Xaminals/Controls/FlyoutHeader.xaml | 16 + .../Xaminals/Controls/FlyoutHeader.xaml.cs | 12 + .../Xaminals/Controls/MonkeySearchHandler.cs | 39 ++ .../Xaminals/Xaminals/Data/BearData.cs | 111 +++++ .../Xaminals/Xaminals/Data/CatData.cs | 103 +++++ .../Xaminals/Xaminals/Data/DogData.cs | 113 +++++ .../Xaminals/Xaminals/Data/ElephantData.cs | 113 +++++ .../Xaminals/Xaminals/Data/MonkeyData.cs | 151 +++++++ .../Xaminals/Xaminals/Models/Animal.cs | 10 + .../Xaminals/ViewModels/BearsViewModel.cs | 32 ++ .../ViewModels/MonkeyDetailViewModel.cs | 50 ++ .../Xaminals/Xaminals/Views/AboutPage.xaml | 85 ++++ .../Xaminals/Xaminals/Views/AboutPage.xaml.cs | 17 + .../Xaminals/Views/BearDetailPage.xaml | 25 + .../Xaminals/Views/BearDetailPage.xaml.cs | 25 + .../Xaminals/Xaminals/Views/BearsPage.xaml | 40 ++ .../Xaminals/Xaminals/Views/BearsPage.xaml.cs | 25 + .../Xaminals/Views/CatDetailPage.xaml | 25 + .../Xaminals/Views/CatDetailPage.xaml.cs | 30 ++ .../Xaminals/Xaminals/Views/CatsPage.xaml | 39 ++ .../Xaminals/Xaminals/Views/CatsPage.xaml.cs | 24 + .../Xaminals/Views/DogDetailPage.xaml | 25 + .../Xaminals/Views/DogDetailPage.xaml.cs | 25 + .../Xaminals/Xaminals/Views/DogsPage.xaml | 33 ++ .../Xaminals/Xaminals/Views/DogsPage.xaml.cs | 24 + .../Xaminals/Views/ElephantDetailPage.xaml | 25 + .../Xaminals/Views/ElephantDetailPage.xaml.cs | 25 + .../Xaminals/Views/ElephantsPage.xaml | 42 ++ .../Xaminals/Views/ElephantsPage.xaml.cs | 24 + .../Xaminals/Views/MonkeyDetailPage.xaml | 33 ++ .../Xaminals/Views/MonkeyDetailPage.xaml.cs | 15 + .../Xaminals/Xaminals/Views/MonkeysPage.xaml | 38 ++ .../Xaminals/Views/MonkeysPage.xaml.cs | 24 + .../Xaminals/Xaminals/Xaminals.csproj | 25 + .../CircleListView.cs | 0 .../CirclePageRenderer.cs | 41 +- .../Shell/IShellItemRenderer.cs | 12 + .../Shell/NavigationDrawer.cs | 426 ++++++++++++++++++ .../Shell/NavigationView.cs | 239 ++++++++++ .../Shell/ShellContentRenderer.cs | 40 ++ .../Shell/ShellItemRenderer.cs | 97 ++++ .../Shell/ShellRenderer.cs | 202 +++++++++ .../Shell/ShellRendererFactory.cs | 53 +++ .../Shell/ShellSectionItemsRenderer.cs | 290 ++++++++++++ .../Shell/ShellSectionNavigationRenderer.cs | 208 +++++++++ ....Wearable.CircularUI.Forms.Renderer.csproj | 2 + .../res/drag_handle_white_18dp.png | Bin 0 -> 107 bytes .../CirclePage.cs | 17 +- .../CircularShell.cs | 17 + .../Tizen.Wearable.CircularUI.Forms.csproj | 2 +- .../SimpleTextWatchface.csproj | 9 +- test/SimpleWidgetApp/SimpleWidgetApp.csproj | 6 +- .../WearableUIGallery.Tizen.Wearable.csproj | 1 - .../WearableUIGallery.csproj | 2 +- 121 files changed, 4434 insertions(+), 27 deletions(-) create mode 100644 sample/ShellExamples/FlyoutExample/App.cs create mode 100644 sample/ShellExamples/FlyoutExample/AppShell.xaml create mode 100644 sample/ShellExamples/FlyoutExample/AppShell.xaml.cs create mode 100644 sample/ShellExamples/FlyoutExample/ConfigPage.xaml create mode 100644 sample/ShellExamples/FlyoutExample/ConfigPage.xaml.cs create mode 100644 sample/ShellExamples/FlyoutExample/FlyoutExample.cs create mode 100644 sample/ShellExamples/FlyoutExample/FlyoutExample.csproj create mode 100644 sample/ShellExamples/FlyoutExample/FlyoutExample.sln create mode 100644 sample/ShellExamples/FlyoutExample/RandomColorPage.cs create mode 100644 sample/ShellExamples/FlyoutExample/SimplePage.xaml create mode 100644 sample/ShellExamples/FlyoutExample/SimplePage.xaml.cs create mode 100644 sample/ShellExamples/FlyoutExample/res/favorite.png create mode 100644 sample/ShellExamples/FlyoutExample/res/home.png create mode 100644 sample/ShellExamples/FlyoutExample/res/inbox.png create mode 100644 sample/ShellExamples/FlyoutExample/res/play.png create mode 100644 sample/ShellExamples/FlyoutExample/res/work.png create mode 100644 sample/ShellExamples/FlyoutExample/shared/res/FlyoutExample.png create mode 100644 sample/ShellExamples/FlyoutExample/tizen-manifest.xml create mode 100644 sample/ShellExamples/ShellNavigation/App.cs create mode 100644 sample/ShellExamples/ShellNavigation/AppShell.xaml create mode 100644 sample/ShellExamples/ShellNavigation/AppShell.xaml.cs create mode 100644 sample/ShellExamples/ShellNavigation/Main.xaml create mode 100644 sample/ShellExamples/ShellNavigation/Main.xaml.cs create mode 100644 sample/ShellExamples/ShellNavigation/Setting.xaml create mode 100644 sample/ShellExamples/ShellNavigation/Setting.xaml.cs create mode 100644 sample/ShellExamples/ShellNavigation/ShellNavigation.cs create mode 100644 sample/ShellExamples/ShellNavigation/ShellNavigation.csproj create mode 100644 sample/ShellExamples/ShellNavigation/ShellNavigation.sln create mode 100644 sample/ShellExamples/ShellNavigation/SubPage.xaml create mode 100644 sample/ShellExamples/ShellNavigation/SubPage.xaml.cs create mode 100644 sample/ShellExamples/ShellNavigation/shared/res/ShellNavigation.png create mode 100644 sample/ShellExamples/ShellNavigation/tizen-manifest.xml create mode 100644 sample/ShellExamples/Xaminals/Metadata.xml create mode 100644 sample/ShellExamples/Xaminals/README.md create mode 100644 sample/ShellExamples/Xaminals/Screenshots/01All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/02All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/03All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/04All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/05All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/06All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/07All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/08All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/09All.png create mode 100644 sample/ShellExamples/Xaminals/Screenshots/10All.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/Xaminals.Tizen.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/Xaminals.Tizen.csproj create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/back.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/bear.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/cat.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/dog.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/elephant.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/help.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/info.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/monkey.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/paw.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/photo.jpg create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/random.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/xamarin_logo.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/res/xamarinstore.jpg create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/shared/res/Xaminals.Tizen.png create mode 100644 sample/ShellExamples/Xaminals/Xaminals.Tizen/tizen-manifest.xml create mode 100644 sample/ShellExamples/Xaminals/Xaminals.sln create mode 100644 sample/ShellExamples/Xaminals/Xaminals/App.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/App.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/AppShell.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/AppShell.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Controls/AnimalSearchHandler.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Controls/FlyoutHeader.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Controls/FlyoutHeader.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Controls/MonkeySearchHandler.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Data/BearData.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Data/CatData.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Data/DogData.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Data/ElephantData.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Data/MonkeyData.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Models/Animal.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/ViewModels/BearsViewModel.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/ViewModels/MonkeyDetailViewModel.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/AboutPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/AboutPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/BearDetailPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/BearDetailPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/BearsPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/BearsPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/CatDetailPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/CatDetailPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/CatsPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/CatsPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/DogDetailPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/DogDetailPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/DogsPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/DogsPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/ElephantDetailPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/ElephantDetailPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/ElephantsPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/ElephantsPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/MonkeyDetailPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/MonkeyDetailPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/MonkeysPage.xaml create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Views/MonkeysPage.xaml.cs create mode 100644 sample/ShellExamples/Xaminals/Xaminals/Xaminals.csproj mode change 100755 => 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/CircleListView.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/IShellItemRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/NavigationDrawer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/NavigationView.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellContentRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellItemRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellRendererFactory.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellSectionItemsRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/Shell/ShellSectionNavigationRenderer.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/res/drag_handle_white_18dp.png mode change 100755 => 100644 src/Tizen.Wearable.CircularUI.Forms/CirclePage.cs create mode 100644 src/Tizen.Wearable.CircularUI.Forms/CircularShell.cs diff --git a/sample/ShellExamples/FlyoutExample/App.cs b/sample/ShellExamples/FlyoutExample/App.cs new file mode 100644 index 00000000..7c6713fa --- /dev/null +++ b/sample/ShellExamples/FlyoutExample/App.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Xamarin.Forms; +using Tizen.Wearable.CircularUI.Forms; + +namespace FlyoutExample +{ + public class App : Application + { + public App() + { + MainPage = new AppShell(); + } + + protected override void OnStart() + { + // Handle when your app starts + } + + protected override void OnSleep() + { + // Handle when your app sleeps + } + + protected override void OnResume() + { + // Handle when your app resumes + } + } +} diff --git a/sample/ShellExamples/FlyoutExample/AppShell.xaml b/sample/ShellExamples/FlyoutExample/AppShell.xaml new file mode 100644 index 00000000..26e12d7a --- /dev/null +++ b/sample/ShellExamples/FlyoutExample/AppShell.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + +