diff options
author | Eunyoung Lee <ey928.lee@samsung.com> | 2022-10-01 07:33:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review> | 2022-10-01 07:33:32 +0000 |
commit | 80bf444ced65795c9e4285b456116d844c35db96 (patch) | |
tree | 1d9573ecc3dada749564a8f47a88d6b9f4adef25 | |
parent | f3907dacc6593c2cbe3032d19d108fe5112614f7 (diff) | |
parent | 642b9bb2801abe25e200e040236b45d6775a3eba (diff) | |
download | tray-80bf444ced65795c9e4285b456116d844c35db96.tar.gz tray-80bf444ced65795c9e4285b456116d844c35db96.tar.bz2 tray-80bf444ced65795c9e4285b456116d844c35db96.zip |
Merge changes I6a011877,I08ba657d into tizen
* changes:
Modifying back button to simplify the structure
Merge branch 'tizen' of ssh://review.tizen.org:29418/profile/iot/apps/dotnet/tray into tizen
-rw-r--r-- | TrayApplication/Common/InputGeneratorBase.cs | 1 | ||||
-rw-r--r-- | TrayApplication/Models/AppInfoModel.cs | 18 | ||||
-rw-r--r-- | TrayApplication/ViewModels/QuickAccessViewModel.cs | 2 | ||||
-rw-r--r-- | TrayApplication/Views/QuickAccessView.cs | 12 | ||||
-rw-r--r--[-rwxr-xr-x] | packaging/org.tizen.TrayApplication-1.0.0.tpk | bin | 5481683 -> 5488337 bytes |
5 files changed, 17 insertions, 16 deletions
diff --git a/TrayApplication/Common/InputGeneratorBase.cs b/TrayApplication/Common/InputGeneratorBase.cs index 3c644da..77e9e87 100644 --- a/TrayApplication/Common/InputGeneratorBase.cs +++ b/TrayApplication/Common/InputGeneratorBase.cs @@ -18,6 +18,7 @@ namespace TrayApplication.Common public static void OnKeyEvent()
{
+ Tizen.Log.Debug(Resources.LogTag, "KeyEvent Called : " + KeyName);
inputGenerator.GenerateKeyEvent(KeyName, 1);
inputGenerator.GenerateKeyEvent(KeyName, 0);
}
diff --git a/TrayApplication/Models/AppInfoModel.cs b/TrayApplication/Models/AppInfoModel.cs index 6a80c9e..b16a870 100644 --- a/TrayApplication/Models/AppInfoModel.cs +++ b/TrayApplication/Models/AppInfoModel.cs @@ -15,7 +15,12 @@ namespace TrayApplication.Models Name = name; ApplicationId = applicationId; IconUrl = url; - AppSelectCommand = new Command(OnAppSelect); + AppSelectCommand = new Command(OnAppSelect);
+
+ if (Name == "back")
+ {
+ InputGeneratorBase.InitInputGenerator(); + } }
public AppInfoModel(string name, string url) @@ -50,8 +55,15 @@ namespace TrayApplication.Models } private void OnAppSelect(object selectedItem) - { - AppLauncher.LaunchApplication(ApplicationId); + {
+ if (Name == "back")
+ {
+ InputGeneratorBase.OnKeyEvent();
+ } + else
+ {
+ AppLauncher.LaunchApplication(ApplicationId);
+ } } private void SetDefaultBackground() diff --git a/TrayApplication/ViewModels/QuickAccessViewModel.cs b/TrayApplication/ViewModels/QuickAccessViewModel.cs index 140252b..100ac0b 100644 --- a/TrayApplication/ViewModels/QuickAccessViewModel.cs +++ b/TrayApplication/ViewModels/QuickAccessViewModel.cs @@ -35,7 +35,7 @@ namespace TrayApplication.ViewModels new AppInfoModel(AppNames[0], "org.tizen.homescreen-efl", imagePath + AppNames[0] + ".png"), new AppInfoModel(AppNames[1], "org.tizen.setting", imagePath + AppNames[1] + ".png"), new AppInfoModel(AppNames[2], "org.tizen.volume", imagePath + AppNames[2] + ".png"), - new AppInfoModel(AppNames[3], imagePath + AppNames[3] + ".png"), + new AppInfoModel(AppNames[3], string.Empty, imagePath + AppNames[3] + ".png"), //new AppInfoModel(AppNames[3], "org.tizen.quickpanel", imagePath + AppNames[3] + ".png"), //Will be added Later //new AppInfoModel(AppNames[5], "org.tizen.powerkey-syspopup", imagePath + AppNames[5] + ".png") //Will be added Later }; diff --git a/TrayApplication/Views/QuickAccessView.cs b/TrayApplication/Views/QuickAccessView.cs index 3b53756..8065101 100644 --- a/TrayApplication/Views/QuickAccessView.cs +++ b/TrayApplication/Views/QuickAccessView.cs @@ -10,8 +10,6 @@ namespace TrayApplication.Views { public class QuickAccessView : View { - private readonly List<string> AppNames = new List<string>() { "home", "settings", "volume", "back", "notifications", "gallery", "power" }; - private const int QuickAccessViewHeight = 124; private const int IconSize = 76; private List<Button> defaultButtons; @@ -96,16 +94,6 @@ namespace TrayApplication.Views button.Icon.SetBinding(ImageView.ResourceUrlProperty, "IconUrl"); button.SetBinding(Control.CommandProperty, "AppSelectCommand");
- button.Name = AppNames[i++];
- if (button.Name == "back")
- {
- InputGeneratorBase.InitInputGenerator();
- button.Clicked += (object sender, ClickedEventArgs e) =>
- {
- Tizen.Log.Debug(Resources.LogTag, "Back button clicked");
- InputGeneratorBase.OnKeyEvent();
- };
- }
Tizen.Log.Info(Resources.LogTag, "Buttons Added");
} }
diff --git a/packaging/org.tizen.TrayApplication-1.0.0.tpk b/packaging/org.tizen.TrayApplication-1.0.0.tpk Binary files differindex 9effc77..05716b6 100755..100644 --- a/packaging/org.tizen.TrayApplication-1.0.0.tpk +++ b/packaging/org.tizen.TrayApplication-1.0.0.tpk |