diff options
author | Hyerim Kim <rimi.kim@samsung.com> | 2017-09-18 20:34:24 +0900 |
---|---|---|
committer | Heonjae Jang <heonjae.jang@samsung.com> | 2017-09-20 06:43:04 +0000 |
commit | 9a3a0aa9d074b24c4c13bd6423bbfe4fff6c9c1c (patch) | |
tree | d5176dfd62320994a629197922d659ff3d9677eb | |
parent | a97ea3324a42236511dd7adf1aa334cb63527ed6 (diff) | |
download | home-9a3a0aa9d074b24c4c13bd6423bbfe4fff6c9c1c.tar.gz home-9a3a0aa9d074b24c4c13bd6423bbfe4fff6c9c1c.tar.bz2 home-9a3a0aa9d074b24c4c13bd6423bbfe4fff6c9c1c.zip |
Modifies Home mainpanel and subpanel depending on UI guideline
- If pushes enter button when the mainpanel is focused, the focus should be moved to subpanel.
- If pushes back button when the subpanel is focused, the focus should bemoved to mainpanel.
Change-Id: I0f38c07dc1920c244b255ca7b41c9e5e9950aa1f
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
-rwxr-xr-x | LibCommon.Shared/Utils/IStatePublisher.cs | 2 | ||||
-rwxr-xr-x | TVHome/TVHome/ViewModels/AppListViewModel.cs | 1 | ||||
-rwxr-xr-x | TVHome/TVHome/ViewModels/MainPanelViewModel.cs | 2 | ||||
-rwxr-xr-x | TVHome/TVHome/ViewModels/SettingsViewModel.cs | 1 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/MainPage.xaml.cs | 6 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/MainPanel.xaml.cs | 9 |
6 files changed, 17 insertions, 4 deletions
diff --git a/LibCommon.Shared/Utils/IStatePublisher.cs b/LibCommon.Shared/Utils/IStatePublisher.cs index ddeee6a..15e2a26 100755 --- a/LibCommon.Shared/Utils/IStatePublisher.cs +++ b/LibCommon.Shared/Utils/IStatePublisher.cs @@ -22,6 +22,8 @@ namespace LibTVRefCommonPortable.Utils HomeInitialized, HomeMainPanelAppsFocused, HomeMainPanelSettingsFocused, + HomeMainPanelAppsSelected, + HomeMainPanelSettingsSelected, HomeSubPanelAppsFocused, HomeSubPanelSettingsFocused, HomeShowOptions, diff --git a/TVHome/TVHome/ViewModels/AppListViewModel.cs b/TVHome/TVHome/ViewModels/AppListViewModel.cs index 998a0e5..d87ef4d 100755 --- a/TVHome/TVHome/ViewModels/AppListViewModel.cs +++ b/TVHome/TVHome/ViewModels/AppListViewModel.cs @@ -229,6 +229,7 @@ namespace TVHome.ViewModels break; case AppState.HomeSubPanelAppsFocused: + case AppState.HomeMainPanelAppsSelected: AppsSubPanelState = PanelState.Focused; break; diff --git a/TVHome/TVHome/ViewModels/MainPanelViewModel.cs b/TVHome/TVHome/ViewModels/MainPanelViewModel.cs index d956a10..c87c436 100755 --- a/TVHome/TVHome/ViewModels/MainPanelViewModel.cs +++ b/TVHome/TVHome/ViewModels/MainPanelViewModel.cs @@ -221,6 +221,8 @@ namespace TVHome.ViewModels case AppState.HomeSubPanelAppsFocused: case AppState.HomeSubPanelSettingsFocused: + case AppState.HomeMainPanelAppsSelected: + case AppState.HomeMainPanelSettingsSelected: foreach (var menuItem in MainList) { HomeMenuAppShortcutInfo homeMenuItem = menuItem as HomeMenuAppShortcutInfo; diff --git a/TVHome/TVHome/ViewModels/SettingsViewModel.cs b/TVHome/TVHome/ViewModels/SettingsViewModel.cs index 5aac445..90860c0 100755 --- a/TVHome/TVHome/ViewModels/SettingsViewModel.cs +++ b/TVHome/TVHome/ViewModels/SettingsViewModel.cs @@ -213,6 +213,7 @@ namespace TVHome.ViewModels break; case AppState.HomeSubPanelSettingsFocused: + case AppState.HomeMainPanelSettingsSelected: SettingsSubPanelState = PanelState.Focused; break; diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index 17c8158..9ce8b47 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -272,13 +272,11 @@ namespace TVHome.Views // TODO : set panel focused for focused panel. break; - case AppState.HomeMainPanelAppsFocused: - // TODO : remove dependency of MainPanel + case AppState.HomeSubPanelAppsFocused: PageMainPanel.SetButtonFocus(0); break; - case AppState.HomeMainPanelSettingsFocused: - // TODO : + case AppState.HomeSubPanelSettingsFocused: PageMainPanel.SetButtonFocus(1); break; diff --git a/TVHome/TVHome/Views/MainPanel.xaml.cs b/TVHome/TVHome/Views/MainPanel.xaml.cs index 73f2e48..918276b 100755 --- a/TVHome/TVHome/Views/MainPanel.xaml.cs +++ b/TVHome/TVHome/Views/MainPanel.xaml.cs @@ -125,6 +125,15 @@ namespace TVHome.Views { DebuggingUtils.Dbg(ItemName + " clicked"); thisButtonInfo.ChangeStatus("selected"); + + if (ItemName == HomeMenuItem.Apps) + { + MainPageViewModel.Publisher.CurrentState = AppState.HomeMainPanelAppsSelected; + } + else + { + MainPageViewModel.Publisher.CurrentState = AppState.HomeMainPanelSettingsSelected; + } }); PanelButtonGrid.Children.Add(button, index + 1, 0); |