From c76e18e092ede80adaec88b529da463bfe23fd9a Mon Sep 17 00:00:00 2001 From: "k.stepaniuk" Date: Wed, 2 Dec 2020 18:40:10 +0100 Subject: [PATCH] Adding 9Patch button Signed-off-by: k.stepaniuk --- Fitness/FitnessApp.cs | 3 ++- Fitness/Views/Styles/Buttons.cs | 13 +++++++------ Fitness/res/layout/ExercisingView.xaml | 4 ++-- Fitness/res/styles/button/button_full_28px.png | Bin 0 -> 1177 bytes 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 Fitness/res/styles/button/button_full_28px.png diff --git a/Fitness/FitnessApp.cs b/Fitness/FitnessApp.cs index a1508f1..80a889c 100644 --- a/Fitness/FitnessApp.cs +++ b/Fitness/FitnessApp.cs @@ -15,7 +15,8 @@ namespace Fitness public void Initialize() { - NavigationService.Instance.NavigateToMainView(); + //NavigationService.Instance.NavigateToMainView(); + NavigationService.Instance.NavigateToExercisingView(); } protected override void OnCreate() diff --git a/Fitness/Views/Styles/Buttons.cs b/Fitness/Views/Styles/Buttons.cs index 6c5103b..99d740a 100644 --- a/Fitness/Views/Styles/Buttons.cs +++ b/Fitness/Views/Styles/Buttons.cs @@ -8,12 +8,13 @@ namespace Fitness.Views.Styles { public static ButtonStyle Regular => new ButtonStyle { - BackgroundImage = new Selector - { - Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_regular.png", - Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_pressed.png", - Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_disabled.png", - }, + BackgroundColor = Color.Transparent, + //BackgroundImage = new Selector + //{ + // Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_full_28px.png", + // Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_pressed.png", + // Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/button_disabled.png", + //}, Text = new TextLabelStyle { PixelSize = 32.0f, diff --git a/Fitness/res/layout/ExercisingView.xaml b/Fitness/res/layout/ExercisingView.xaml index 19aa54a..3cb0af0 100644 --- a/Fitness/res/layout/ExercisingView.xaml +++ b/Fitness/res/layout/ExercisingView.xaml @@ -24,6 +24,6 @@ BindingContext="{Binding Source={x:Reference Root}, Path=BindingContext}"/> + PrevCommand="{Binding Prev}" + NextCommand="{Binding Next}"/> diff --git a/Fitness/res/styles/button/button_full_28px.png b/Fitness/res/styles/button/button_full_28px.png new file mode 100644 index 0000000000000000000000000000000000000000..9bdbe89d1f1265447b660deeeb073b492562233d GIT binary patch literal 1177 zcmV;K1ZMk*P)!u6ytK>fCeBx%XT#IdMnVn#52>)~W6DfUAMCfKz~zv(Kr(aRti$0sI8~0{onP ze-C^p>EH+exl#a`($@pm0q0jd;BSBrfcGneQ4IjwOMx}O1r;k@)ZACVR!JYvv%mQP zu)PS_09-uJfz0*s0P&Kf&*s>`+yL0V2zUSp0CkX0ftMu(kYQwa0Jc{HYk^Ar$1tNV z_;0K#uSnWDL|cOcupOTJQQ(FlI+(;?-vyqM6e~)Z3(``B1+fN*-#C}9b!CH-0CH~Km<+wtZjsF`Nj zE$NY=0oYyzte4V>9f05Jt(D#Vls=>pIs$5-?YpOf@P7XaHQ z0q+3EH}vf%wGIQfNcwe_1=zk4c%k9SC-v@{YyzJ6M*-!)0>9r*jJq&B;Aw%M1l}`K%3+*NlOxd&)cMV(pA!;0ASk@ z7Pd|n04!L*!W5YC0pSE%?F0iroU@o(lyBf+LQ{X_Z%tl@&w@38lClz%MkZU zTCB)ydzLr(xv7ZgPjQRm+z z`4+e>R~#`D1oteHvmK{Iaaz>?Af!0q31CT+OmJ1WRV{b#!-vgNI-~du%w(kVi)o|}1iXS)UY5)h&zaS1M zd(!r$z}+=kA;x!UDi6o@6`LB}1K8*+