diff options
| -rwxr-xr-x | build.sh | 14 | ||||
| -rw-r--r-- | main.go | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..fb81258 --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -z "$ANDORID_NDK_HOME" ]; then + # This is where I personally have installed the Android NDK + export ANDROID_NDK_HOME=~/android-ndk/android-ndk-r26b +fi + +fyne package -os android -appID org.buetow.quicklogger -icon logo-small.png + +if [ -d ~/Documents/APKs ]; then + # Will be synced to my phone by Syncthing, so I can install it there. + cp -v quicklogger.apk ~/Documents/APKs +fi + @@ -19,7 +19,7 @@ const ( var windowSize = fyne.NewSize(200, 100) -func createPreferenceWindow(a fyne.App) fyne.Window { +func createPreferenceWindow(a fyne.App, mainWindow fyne.Window) fyne.Window { window := a.NewWindow("Preferences") window.Resize(windowSize) directoryPreference := widget.NewEntry() @@ -28,6 +28,7 @@ func createPreferenceWindow(a fyne.App) fyne.Window { saveButton := widget.NewButton("Save", func() { a.Preferences().SetString("Directory", directoryPreference.Text) window.Hide() + mainWindow.Show() }) preferencesContent := container.NewVBox( @@ -63,7 +64,7 @@ func createMainWindow(a fyne.App) fyne.Window { input, button, widget.NewButton("Preferences", func() { - createPreferenceWindow(a).Show() + createPreferenceWindow(a, window).Show() }), )) window.Resize(windowSize) |
