From 436be22132c8755308252f5dc6da89e3dde64013 Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Wed, 27 May 2015 00:08:06 +0200 Subject: [PATCH] Version 2.2.5: Design fixes for new about section; better tablet recognization; bug fixes (api up to 18) --- .../morseconverter/MainActivity.java | 10 +- .../res/drawable-hdpi/blue_background.xml | 9 + .../res/drawable-ldpi/blue_background.xml | 9 + .../res/drawable-mdpi/blue_background.xml | 9 + .../res/drawable-tvdpi/blue_background.xml | 9 + .../res/drawable-xhdpi/blue_background.xml | 9 + .../res/drawable-xxhdpi/blue_background.xml | 9 + .../res/drawable-xxxhdpi/blue_background.xml | 9 + app/src/main/res/drawable/blue_background.xml | 9 + .../res/layout-large-land/fragment_about.xml | 8 +- .../fragment_written_morse_list.xml | 8 +- .../main/res/layout-v19/fragment_about.xml | 194 ++++++++++++++++++ app/src/main/res/layout/fragment_about.xml | 24 ++- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 15 files changed, 296 insertions(+), 24 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/blue_background.xml create mode 100644 app/src/main/res/drawable-ldpi/blue_background.xml create mode 100644 app/src/main/res/drawable-mdpi/blue_background.xml create mode 100644 app/src/main/res/drawable-tvdpi/blue_background.xml create mode 100644 app/src/main/res/drawable-xhdpi/blue_background.xml create mode 100644 app/src/main/res/drawable-xxhdpi/blue_background.xml create mode 100644 app/src/main/res/drawable-xxxhdpi/blue_background.xml create mode 100644 app/src/main/res/drawable/blue_background.xml create mode 100644 app/src/main/res/layout-v19/fragment_about.xml diff --git a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java index 3abf282..b51c7f1 100644 --- a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java +++ b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java @@ -25,7 +25,6 @@ import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; -import android.content.res.Configuration; import android.content.res.Resources; import android.net.Uri; import android.os.Bundle; @@ -104,14 +103,9 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_TO_FIRST); Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); - int screenSize = getResources().getConfiguration().screenLayout & - Configuration.SCREENLAYOUT_SIZE_MASK; - - if(!((screenSize == Configuration.SCREENLAYOUT_SIZE_LARGE || - screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE) && - (display.getRotation() == Surface.ROTATION_90 || - display.getRotation() == Surface.ROTATION_270))){ + if(display.getRotation() == Surface.ROTATION_90 || + display.getRotation() == Surface.ROTATION_270){ enableToolbarElevation(); } diff --git a/app/src/main/res/drawable-hdpi/blue_background.xml b/app/src/main/res/drawable-hdpi/blue_background.xml new file mode 100644 index 0000000..21b0696 --- /dev/null +++ b/app/src/main/res/drawable-hdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-ldpi/blue_background.xml b/app/src/main/res/drawable-ldpi/blue_background.xml new file mode 100644 index 0000000..370f198 --- /dev/null +++ b/app/src/main/res/drawable-ldpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-mdpi/blue_background.xml b/app/src/main/res/drawable-mdpi/blue_background.xml new file mode 100644 index 0000000..832f2e3 --- /dev/null +++ b/app/src/main/res/drawable-mdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-tvdpi/blue_background.xml b/app/src/main/res/drawable-tvdpi/blue_background.xml new file mode 100644 index 0000000..fc5d61f --- /dev/null +++ b/app/src/main/res/drawable-tvdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/blue_background.xml b/app/src/main/res/drawable-xhdpi/blue_background.xml new file mode 100644 index 0000000..a636359 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xxhdpi/blue_background.xml b/app/src/main/res/drawable-xxhdpi/blue_background.xml new file mode 100644 index 0000000..40fb227 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xxxhdpi/blue_background.xml b/app/src/main/res/drawable-xxxhdpi/blue_background.xml new file mode 100644 index 0000000..08dd115 --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/blue_background.xml b/app/src/main/res/drawable/blue_background.xml new file mode 100644 index 0000000..9d15c4f --- /dev/null +++ b/app/src/main/res/drawable/blue_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-large-land/fragment_about.xml b/app/src/main/res/layout-large-land/fragment_about.xml index d6c82fd..0e147f2 100644 --- a/app/src/main/res/layout-large-land/fragment_about.xml +++ b/app/src/main/res/layout-large-land/fragment_about.xml @@ -30,10 +30,10 @@ + android:layout_height="wrap_content" + android:background="@drawable/blue_background" /> - - + diff --git a/app/src/main/res/layout-large-land/fragment_written_morse_list.xml b/app/src/main/res/layout-large-land/fragment_written_morse_list.xml index 0a53582..89377ef 100644 --- a/app/src/main/res/layout-large-land/fragment_written_morse_list.xml +++ b/app/src/main/res/layout-large-land/fragment_written_morse_list.xml @@ -1,14 +1,16 @@ + android:layout_height="match_parent" + tools:context=".MainActivity"> + android:layout_height="wrap_content" + android:background="@drawable/blue_background" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 9bd893d..8de66ba 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -20,20 +20,29 @@ marcelmichaelkapfer@yahoo.co.nz --> - + + style="@style/LinearLayoutListContainer" + android:layout_height="fill_parent" + android:layout_gravity="top"> - + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 6f2148a..31f838f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -38,7 +38,7 @@ Wenn Du einen Fehler gefunden hast, schreibe mit bitte ein Email an marcelmichaelkapfer@yahoo.co.nz Du kannst eine ausführliche Anwendung auf marcel-kapfer.de/writtenmorse/index.html#howto_android finden. Wenn du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine Email an marcelmichaelkapfer@yahoo.co.nz. - 2.2.4 \n20. Mai 2015 + 2.2.5 \n27. Mai 2015 Fehler Kontakt Entwickler diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f652d40..5fd3b34 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -43,7 +43,7 @@ How to Missing Code - 2.2.4 \n20 May 2015 + 2.2.5 \n27 May 2015 Marcel Michael Kapfer marcel-kapfer.de/writtenmorse marcelmichaelkapfer@yahoo.co.nz