Version 2.2.5: Design fixes for new about section; better tablet recognization; bug fixes (api up to 18)

This commit is contained in:
mmk2410 2015-05-27 00:08:06 +02:00
parent 9acb33c0c4
commit 436be22132
15 changed files with 296 additions and 24 deletions

View File

@ -25,7 +25,6 @@ import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
@ -104,14 +103,9 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_TO_FIRST); setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_TO_FIRST);
Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); 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(); enableToolbarElevation();
} }

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/colorPrimary"></solid>
<size android:height="150dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/colorPrimary"></solid>
<size android:height="80dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/colorPrimary"></solid>
<size android:height="130dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/colorPrimary"></solid>
<size android:height="140dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<solid android:color="@color/colorPrimary"/>
<size android:height="200dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<solid android:color="@color/colorPrimary"/>
<size android:height="250dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<solid android:color="@color/colorPrimary"/>
<size android:height="300dp"></size>
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<solid android:color="@color/colorPrimary"/>
<size android:height="120dp"></size>
</shape>
</item>
</selector>

View File

@ -30,10 +30,10 @@
<RelativeLayout <RelativeLayout
android:id="@+id/wml_back" android:id="@+id/wml_back"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="400px" android:layout_height="wrap_content"
android:background="@color/colorPrimary" /> android:background="@drawable/blue_background" />
<LinearLayout <RelativeLayout
style="@style/LinearLayoutListContainer" style="@style/LinearLayoutListContainer"
android:background="@color/white" android:background="@color/white"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -206,6 +206,6 @@
</ScrollView> </ScrollView>
</LinearLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>

View File

@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="match_parent" android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout <RelativeLayout
android:id="@+id/wml_back" android:id="@+id/wml_back"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="400px" android:layout_height="wrap_content"
android:background="@color/colorPrimary" /> android:background="@drawable/blue_background" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/wm_recycler" android:id="@+id/wm_recycler"

View File

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This is a Android application for converting writtenMorse and normal morse code.
Copyright (C) 2014-2015 Marcel Michael Kapfer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Marcel Michael Kapfer
marcelmichaelkapfer@yahoo.co.nz
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/about"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff"
tools:context=".AboutActivity$PlaceholderFragment">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/scrollView">
<LinearLayout
style="@style/LinearLayoutListContainer"
android:layout_height="fill_parent"
android:layout_gravity="top">
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="versionEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionVersion"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutVersion" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="developerEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionDeveloper"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutDeveloper" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="websiteEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionWebsite"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutWebsite" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="contactEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionContact"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutContact" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="licenseEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionLicense"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutLicense" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="bugEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionBug"
/>
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutBug" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="howtoEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionHow"
/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutHow" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="missingCodeEntry">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionMissing"
/>
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutMissing"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -20,20 +20,29 @@
marcelmichaelkapfer@yahoo.co.nz marcelmichaelkapfer@yahoo.co.nz
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/about" android:id="@+id/about"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="match_parent" android:layout_height="fill_parent"
android:background="#fff" android:background="#fff"
android:layout_gravity="top"
android:layout_alignParentTop="true"
android:layout_alignTop="@id/about"
android:layout_alignWithParentIfMissing="true"
android:layout_marginTop="-50dp"
tools:context=".AboutActivity$PlaceholderFragment"> tools:context=".AboutActivity$PlaceholderFragment">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="match_parent" android:layout_height="fill_parent"
android:id="@+id/scrollView"> android:id="@+id/scrollView">
<LinearLayout <LinearLayout
style="@style/LinearLayoutListContainer"> style="@style/LinearLayoutListContainer"
android:layout_height="fill_parent"
android:layout_gravity="top">
<LinearLayout <LinearLayout
style="@style/LinearLayoutList" style="@style/LinearLayoutList"
@ -166,6 +175,7 @@
<LinearLayout <LinearLayout
style="@style/LinearLayoutList" style="@style/LinearLayoutList"
android:paddingBottom="70dp"
android:onClick="missingCodeEntry"> android:onClick="missingCodeEntry">
<TextView <TextView
@ -188,4 +198,4 @@
</ScrollView> </ScrollView>
</RelativeLayout> </LinearLayout>

View File

@ -38,7 +38,7 @@
<string name="aboutBug">Wenn Du einen Fehler gefunden hast, schreibe mit bitte ein Email an marcelmichaelkapfer@yahoo.co.nz</string> <string name="aboutBug">Wenn Du einen Fehler gefunden hast, schreibe mit bitte ein Email an marcelmichaelkapfer@yahoo.co.nz</string>
<string name="aboutHow">Du kannst eine ausführliche Anwendung auf marcel-kapfer.de/writtenmorse/index.html#howto_android finden.</string> <string name="aboutHow">Du kannst eine ausführliche Anwendung auf marcel-kapfer.de/writtenmorse/index.html#howto_android finden.</string>
<string name="aboutMissing">Wenn du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine Email an marcelmichaelkapfer@yahoo.co.nz.</string> <string name="aboutMissing">Wenn du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine Email an marcelmichaelkapfer@yahoo.co.nz.</string>
<string name="aboutVersion">2.2.4 \n20. Mai 2015</string> <string name="aboutVersion">2.2.5 \n27. Mai 2015</string>
<string name="sectionBug">Fehler</string> <string name="sectionBug">Fehler</string>
<string name="sectionContact">Kontakt</string> <string name="sectionContact">Kontakt</string>
<string name="sectionDeveloper">Entwickler</string> <string name="sectionDeveloper">Entwickler</string>

View File

@ -43,7 +43,7 @@
<string name="sectionHow">How to</string> <string name="sectionHow">How to</string>
<string name="sectionMissing">Missing Code</string> <string name="sectionMissing">Missing Code</string>
<!--About Texts--> <!--About Texts-->
<string name="aboutVersion">2.2.4 \n20 May 2015</string> <string name="aboutVersion">2.2.5 \n27 May 2015</string>
<string name="aboutDeveloper" translatable="false">Marcel Michael Kapfer</string> <string name="aboutDeveloper" translatable="false">Marcel Michael Kapfer</string>
<string name="aboutWebsite" translatable="false">marcel-kapfer.de/writtenmorse</string> <string name="aboutWebsite" translatable="false">marcel-kapfer.de/writtenmorse</string>
<string name="aboutContact" translatable="false">marcelmichaelkapfer@yahoo.co.nz</string> <string name="aboutContact" translatable="false">marcelmichaelkapfer@yahoo.co.nz</string>