summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-06-07 05:35:46 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 02:11:26 (GMT)
commit380a5a587def1cbcaf29713f5afbe781f1165a60 (patch)
tree5e06005f20912b892f52350e0678baa9cb319b61
parentb32f1b834b533e027785de74a7ab8f5c1183a122 (diff)
downloadxamarin-forms-380a5a587def1cbcaf29713f5afbe781f1165a60.zip
xamarin-forms-380a5a587def1cbcaf29713f5afbe781f1165a60.tar.gz
xamarin-forms-380a5a587def1cbcaf29713f5afbe781f1165a60.tar.bz2
Fix Naviitem style and toolbar style/mode for given profile (TV/Mobile)
- TASK=TCAPI-2463 Change-Id: Ia673842d47ca08111b2cae0bfb6a9fd1ce7b81d2
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs6
-rw-r--r--[-rwxr-xr-x]Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs13
2 files changed, 17 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs
index bc1a2cb..d43fea8 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs
@@ -163,7 +163,11 @@ namespace Xamarin.Forms.Platform.Tizen
void UpdateHasNavigationBar(Page page)
{
NaviItem item = GetNaviItemForPage(page);
- item.Style = page is TabbedPage ? "tabbar" : "default";
+ //According to TV UX Guideline, item style should be set to "tabbar" in case of TabbedPage only for TV profile.
+ if (Device.Idiom == TargetIdiom.TV)
+ {
+ item.Style = page is TabbedPage ? "tabbar" : "default";
+ }
item.TitleBarVisible = (bool)page.GetValue(NavigationPage.HasNavigationBarProperty);
UpdateToolbarItem(page, item);
UpdateBarBackgroundColor(item);
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs
index 4ca3e77..b586866 100755..100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs
@@ -48,8 +48,19 @@ namespace Xamarin.Forms.Platform.Tizen
AlignmentX = -1,
WeightX = 1,
SelectionMode = ToolbarSelectionMode.Always,
- Style = "tabbar_with_title"
};
+
+ if (Device.Idiom == TargetIdiom.Phone)
+ {
+ //Set ShrinkMode to Expand as defauly only for Mobile profile
+ _toolbar.ShrinkMode = ToolbarShrinkMode.Expand;
+ }
+ else if (Device.Idiom == TargetIdiom.TV)
+ {
+ //According to TV UX Guideline, toolbar style should be set to "tabbar_with_title" in case of TabbedPage only for TV profile.
+ _toolbar.Style = "tabbar_with_title";
+ }
+
_toolbar.Show();
//Add callback for Toolbar item selection
_toolbar.Selected += OnToolbarItemSelected;