Skip to content

Commit

Permalink
Added version information, layout is ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Release-Candidate committed Apr 10, 2021
1 parent 1e9b8c3 commit 7b7c441
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
22 changes: 14 additions & 8 deletions src/Tzolkin.Android/MainActivity.fs
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,30 @@ open TzolkinApp
MainLauncher = true,
ConfigurationChanges = (ConfigChanges.ScreenSize
||| ConfigChanges.Orientation))>]
type MainActivity() =
inherit FormsAppCompatActivity()
type MainActivity () =
inherit FormsAppCompatActivity ()

override this.OnCreate(bundle: Bundle) =
FormsAppCompatActivity.TabLayoutResource <- Resources.Layout.Tabbar
FormsAppCompatActivity.ToolbarResource <- Resources.Layout.Toolbar

base.OnCreate(bundle)
Xamarin.Essentials.Platform.Init(this, bundle)
Xamarin.Forms.Forms.Init(this, bundle)
base.OnCreate (bundle)
Xamarin.Essentials.Platform.Init (this, bundle)
Xamarin.Forms.Forms.Init (this, bundle)
Xamarin.Essentials.VersionTracking.Track ()

this.LoadApplication(TzolkinApp.App())
this.LoadApplication (TzolkinApp.App ())

override this.OnRequestPermissionsResult
(
requestCode: int,
permissions: string [],
[<GeneratedEnum>] grantResults: Android.Content.PM.Permission []
) =
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults)
base.OnRequestPermissionsResult(requestCode, permissions, grantResults)
Xamarin.Essentials.Platform.OnRequestPermissionsResult (
requestCode,
permissions,
grantResults
)

base.OnRequestPermissionsResult (requestCode, permissions, grantResults)
2 changes: 1 addition & 1 deletion src/Tzolkin.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="5" android:versionName="0.9.5" package="com.RC.Tzolkin" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="6" android:versionName="0.9.6" package="com.RC.Tzolkin" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:label="Tzolkin" android:icon="@drawable/icon"></application>
</manifest>
6 changes: 3 additions & 3 deletions src/Tzolkin.Android/Tzolkin.Android.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<AndroidLinkMode>None</AndroidLinkMode>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<SelectedDevice>pixel_2_nougat_7_0_-_api_24</SelectedDevice>
<ActiveDebugProfile>pixel_2_nougat_7_0_-_api_24</ActiveDebugProfile>
<DefaultDevice>pixel_2_nougat_7_0_-_api_24</DefaultDevice>
<SelectedDevice>Pixel_3a_API_30_x86</SelectedDevice>
<ActiveDebugProfile>Pixel_3a_API_30_x86</ActiveDebugProfile>
<DefaultDevice>Pixel_3a_API_30_x86</DefaultDevice>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
26 changes: 16 additions & 10 deletions src/Tzolkin/Tzolkin.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ open System.Diagnostics
open Fabulous
open Fabulous.XamarinForms
open Xamarin.Forms
open Xamarin.Essentials
open System.Globalization

open RC.Maya
Expand All @@ -24,6 +25,9 @@ module TzolkinApp =


/// App-wide constants.
let version =
sprintf "%s (Build %s)" VersionTracking.CurrentVersion VersionTracking.CurrentBuild

let fontSize = FontSize.fromNamedSize NamedSize.Medium

let numberPickList = List.map (fun x -> x.ToString ()) [ 1 .. 13 ]
Expand Down Expand Up @@ -325,7 +329,7 @@ module TzolkinApp =
Dimension.Auto
Dimension.Auto
Dimension.Star
Dimension.Absolute 100. ],
Dimension.Absolute 15. ],
coldefs =
[ Dimension.Stars 0.4
Dimension.Stars 0.6 ],
Expand Down Expand Up @@ -358,19 +362,21 @@ module TzolkinApp =
View
.ListView(ref = dateListView,
items = fillListViewFilter model,
//backgroundColor = Color.Green,
// verticalOptions = LayoutOptions.Fill,

horizontalOptions = LayoutOptions.Start)
.Row(0)
.Column(0)
.RowSpan (5)
//View
// .BoxView(color = Color.Blue,
// horizontalOptions = LayoutOptions.Fill,
// verticalOptions = LayoutOptions.Fill)
// .Row(5)
// .Column(0)
// .ColumnSpan (2)
View
.Label(text = version,
fontSize = FontSize.fromNamedSize NamedSize.Micro,
verticalTextAlignment = TextAlignment.End,
horizontalTextAlignment = TextAlignment.End,
horizontalOptions = LayoutOptions.Fill,
verticalOptions = LayoutOptions.Fill)
.Row(5)
.Column(0)
.ColumnSpan (2)

]
) ]
Expand Down

0 comments on commit 7b7c441

Please sign in to comment.