Dynamic Element Sizes

This commit is contained in:
2019-07-09 17:08:56 -05:00
parent 60ec28c952
commit 183febe9c0
7 changed files with 44 additions and 27 deletions
+7 -5
View File
@@ -5,11 +5,11 @@
<package id="Acr.UserDialogs" version="7.0.4" targetFramework="monoandroid81" />
<package id="AndHUD" version="1.4.1" targetFramework="monoandroid81" />
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="monoandroid81" />
<package id="Microsoft.NETCore.Platforms" version="2.2.0" targetFramework="monoandroid81" />
<package id="Microsoft.NETCore.Platforms" version="2.2.1" targetFramework="monoandroid81" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="monoandroid81" />
<package id="Splat" version="7.0.8" targetFramework="monoandroid81" />
<package id="Splat" version="7.3.7" targetFramework="monoandroid81" />
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
@@ -33,8 +33,9 @@
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Net.Http" version="4.3.4" targetFramework="monoandroid81" />
<package id="System.Net.NetworkInformation" version="4.3.0" targetFramework="monoandroid80" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Net.Primitives" version="4.3.1" targetFramework="monoandroid81" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="monoandroid81" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Reactive" version="4.1.5" targetFramework="monoandroid81" />
<package id="System.Reactive.Core" version="4.1.5" targetFramework="monoandroid81" />
@@ -60,7 +61,7 @@
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="monoandroid80" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="monoandroid81" />
<package id="System.Threading" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="monoandroid81" />
@@ -88,6 +89,7 @@
<package id="Xamarin.Android.Support.v7.Palette" version="28.0.0.1" targetFramework="monoandroid81" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="28.0.0.1" targetFramework="monoandroid81" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="28.0.0.1" targetFramework="monoandroid81" />
<package id="Xamarin.Forms" version="3.6.0.344457" targetFramework="monoandroid81" />
<package id="Xamarin.Essentials" version="1.1.0" targetFramework="monoandroid81" />
<package id="Xamarin.Forms" version="4.0.0.497661" targetFramework="monoandroid81" />
<package id="Zeroconf" version="3.0.30" targetFramework="monoandroid81" />
</packages>
+13 -8
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.3.6.0.344457\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.3.6.0.344457\build\Xamarin.Forms.props')" />
<Import Project="..\packages\Xamarin.Forms.4.0.0.497661\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.4.0.0.497661\build\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -79,7 +79,7 @@
<HintPath>..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll</HintPath>
</Reference>
<Reference Include="Splat">
<HintPath>..\packages\Splat.7.0.8\lib\monoandroid81\Splat.dll</HintPath>
<HintPath>..\packages\Splat.7.3.7\lib\monoandroid81\Splat.dll</HintPath>
</Reference>
<Reference Include="System.Reactive">
<HintPath>..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll</HintPath>
@@ -151,24 +151,29 @@
<HintPath>..\packages\Xamarin.Android.Support.v7.MediaRouter.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath>
</Reference>
<Reference Include="FormsViewGroup">
<HintPath>..\packages\Xamarin.Forms.3.6.0.344457\lib\MonoAndroid81\FormsViewGroup.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.0.0.497661\lib\MonoAndroid81\FormsViewGroup.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.3.6.0.344457\lib\MonoAndroid81\Xamarin.Forms.Core.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.0.0.497661\lib\MonoAndroid81\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.Android">
<HintPath>..\packages\Xamarin.Forms.3.6.0.344457\lib\MonoAndroid81\Xamarin.Forms.Platform.Android.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.0.0.497661\lib\MonoAndroid81\Xamarin.Forms.Platform.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.3.6.0.344457\lib\MonoAndroid81\Xamarin.Forms.Platform.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.0.0.497661\lib\MonoAndroid81\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.3.6.0.344457\lib\MonoAndroid81\Xamarin.Forms.Xaml.dll</HintPath>
<HintPath>..\packages\Xamarin.Forms.4.0.0.497661\lib\MonoAndroid81\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="Xamarin.Android.Support.CustomTabs">
<HintPath>..\packages\Xamarin.Android.Support.CustomTabs.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.CustomTabs.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Essentials">
<HintPath>..\packages\Xamarin.Essentials.1.1.0\lib\monoandroid81\Xamarin.Essentials.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
@@ -221,5 +226,5 @@
<Import Project="..\packages\Xamarin.Android.Support.Design.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.Design.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Design.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.Design.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.v7.MediaRouter.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.v7.MediaRouter.targets" Condition="Exists('..\packages\Xamarin.Android.Support.v7.MediaRouter.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.v7.MediaRouter.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.CustomTabs.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.CustomTabs.targets" Condition="Exists('..\packages\Xamarin.Android.Support.CustomTabs.28.0.0.1\build\monoandroid81\Xamarin.Android.Support.CustomTabs.targets')" />
<Import Project="..\packages\Xamarin.Forms.3.6.0.344457\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.3.6.0.344457\build\Xamarin.Forms.targets')" />
<Import Project="..\packages\Xamarin.Forms.4.0.0.497661\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.4.0.0.497661\build\Xamarin.Forms.targets')" />
</Project>
@@ -72,21 +72,22 @@ namespace qController
nameLabel.HorizontalTextAlignment = TextAlignment.Center;
nameLabel.VerticalTextAlignment = TextAlignment.End;
nameLabel.FontAttributes = FontAttributes.Bold;
nameLabel.FontSize = 20;
nameLabel.FontSize = App.HeightUnit * 3;
addressLabel.HorizontalTextAlignment = TextAlignment.Center;
addressLabel.VerticalTextAlignment = TextAlignment.Start;
addressLabel.FontSize = App.HeightUnit * 2.5;
connectLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
connectLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
connectLabel.Text = QIcon.WIFI;
connectLabel.FontSize = 40;
connectLabel.FontSize = App.HeightUnit * 6;
connectLabel.TextColor = Color.LimeGreen;
deleteLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
deleteLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
deleteLabel.Text = QIcon.TRASH_EMPTY;
deleteLabel.FontSize = 40;
deleteLabel.FontSize = App.HeightUnit * 6;
deleteLabel.TextColor = Color.Red;
connectLabel.FontFamily = App.QFont;
@@ -21,7 +21,7 @@ namespace qController
RowDefinitions =
{
new RowDefinition{Height = GridLength.Star},
new RowDefinition{Height = GridLength.Star}
new RowDefinition{Height = new GridLength(2, GridUnitType.Star)}
},
ColumnDefinitions =
{
@@ -69,7 +69,7 @@ namespace qController
number = new Label {
Text = "",
FontAttributes = FontAttributes.Bold,
FontSize = 30,
FontSize = App.HeightUnit * 5,
Margin = new Thickness(5)
};
@@ -77,7 +77,7 @@ namespace qController
Text = "Loading Workspace....",
FontAttributes = FontAttributes.Bold,
HorizontalTextAlignment = TextAlignment.Center,
FontSize = 20,
FontSize = App.HeightUnit * 3.5,
Margin = new Thickness(0)
};
@@ -87,10 +87,13 @@ namespace qController
VerticalTextAlignment = TextAlignment.Center,
HorizontalTextAlignment = TextAlignment.End,
Margin = new Thickness(5),
FontSize = 27
FontSize = App.HeightUnit * 5
};
notes = new Label { Text = "Loading Cue Lists and Playhead Position" };
notes = new Label {
Text = "Loading Cue Lists and Playhead Position",
HorizontalTextAlignment = TextAlignment.Center
};
notes.HorizontalTextAlignment = TextAlignment.Center;
notes.Margin = new Thickness(0, 0, 0, 10);
+6 -2
View File
@@ -11,7 +11,9 @@ namespace qController
public static string QFont;
public static DisplayInfo mainDisplayInfo;
public static double Height;
public static double Width;
public static double Width;
public static double HeightUnit;
public static double WidthUnit;
public static bool MenuIsPresented
{
get
@@ -33,7 +35,9 @@ namespace qController
mainDisplayInfo = DeviceDisplay.MainDisplayInfo;
Height = mainDisplayInfo.Height / mainDisplayInfo.Density;
Width = mainDisplayInfo.Width / mainDisplayInfo.Density;
Width = mainDisplayInfo.Width / mainDisplayInfo.Density;
HeightUnit = Height / 100.0;
WidthUnit = Width / 100.0;
System.Console.WriteLine(Height);
System.Console.WriteLine(Width);
switch (Device.RuntimePlatform)
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:qController" x:Class="qController.QConnectionPage">
<StackLayout x:Name="sLayout">
@@ -10,7 +10,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25"/>
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0"/>
</Grid>
<ListView x:Name="lstView" HasUnevenRows = "true" >
</ListView>
@@ -54,10 +54,12 @@ namespace qController
switch (Device.RuntimePlatform)
{
case Device.iOS:
menuButton.Margin = new Thickness(20, 35, 20, 10);
menuButton.Margin =
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
menuButton.FontSize = App.Height * .04;
break;
case Device.Android:
topBar.HeightRequest = 50;
topBar.HeightRequest = Math.Max(App.Height * .09, 65);
menuButton.Margin = new Thickness(20, 10, 20, 10);
break;
}