Update styling for Android

This commit is contained in:
2020-10-18 18:23:13 -05:00
parent ce4bdc609f
commit cc92703b33
2 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -15,13 +15,13 @@
<item name="colorPrimaryDark">#1976D2</item> <item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated <!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets --> which is used to tint widgets -->
<item name="colorAccent">#FF4081</item> <item name="colorAccent">#71AEFF</item>
<!-- You can also set colorControlNormal, colorControlActivated <!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. --> colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item> <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style> </style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog"> <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item> <item name="colorAccent">#71AEFF</item>
</style> </style>
</resources> </resources>
+8 -4
View File
@@ -4,7 +4,7 @@ namespace qController.UI
{ {
public class QNavBar : Grid public class QNavBar : Grid
{ {
public Button menuButton; public Label menuButton;
public Label instanceName; public Label instanceName;
public QNavBar() public QNavBar()
@@ -23,15 +23,17 @@ namespace qController.UI
new ColumnDefinition {Width = new GridLength(4,GridUnitType.Star)}, new ColumnDefinition {Width = new GridLength(4,GridUnitType.Star)},
}; };
menuButton = new Button menuButton = new Label
{ {
FontFamily = App.QFont, FontFamily = App.QFont,
HorizontalOptions = LayoutOptions.StartAndExpand, HorizontalOptions = LayoutOptions.StartAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalTextAlignment = TextAlignment.Start,
VerticalTextAlignment = TextAlignment.Center,
Padding = 0, Padding = 0,
Margin = new Thickness(10,0,0,0), Margin = new Thickness(10,0,0,0),
Text = QIcon.MENU, Text = QIcon.MENU,
CornerRadius = 0, BackgroundColor = Color.Transparent,
//BackgroundColor = Color.Red //BackgroundColor = Color.Red
}; };
@@ -53,7 +55,9 @@ namespace qController.UI
instanceName.SetDynamicResource(Label.TextColorProperty, "PrimaryTextColor"); instanceName.SetDynamicResource(Label.TextColorProperty, "PrimaryTextColor");
menuButton.Clicked += App.ShowMenu; var menuButtonGesture = new TapGestureRecognizer();
menuButtonGesture.Tapped += App.ShowMenu;
menuButton.GestureRecognizers.Add(menuButtonGesture);
switch (Device.RuntimePlatform) switch (Device.RuntimePlatform)
{ {