Version 2.2.4: New Design for writtenMorse list and about; Fixed links
This commit is contained in:
parent
12d2f20dad
commit
5d2e0cc9fc
7 changed files with 69 additions and 26 deletions
|
@ -25,11 +25,15 @@ 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;
|
||||||
import android.support.v7.widget.CardView;
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.Surface;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -99,6 +103,19 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
|
||||||
this.disableLearningPattern(); //Doesn't open the drawer always when the app starts
|
this.disableLearningPattern(); //Doesn't open the drawer always when the app starts
|
||||||
setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_TO_FIRST);
|
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))){
|
||||||
|
|
||||||
|
enableToolbarElevation();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
mDrawerToggle = new MaterialActionBarDrawerToggle(this, null, null, 0, 0){
|
mDrawerToggle = new MaterialActionBarDrawerToggle(this, null, null, 0, 0){
|
||||||
|
|
||||||
public void onDrawerClosed(View view){
|
public void onDrawerClosed(View view){
|
||||||
|
@ -262,10 +279,10 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
|
||||||
}
|
}
|
||||||
|
|
||||||
//called when clicking on the website entry in the about fragment
|
//called when clicking on the website entry in the about fragment
|
||||||
//opens marcel-kapfer.de/projects/morse/
|
//opens marcel-kapfer.de/writtenmorse
|
||||||
public void websiteEntry(View view){
|
public void websiteEntry(View view){
|
||||||
try{
|
try{
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/projects/morse/"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/writtenmorse/"));
|
||||||
startActivity(browserIntent);
|
startActivity(browserIntent);
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -309,7 +326,7 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
|
||||||
//opens the howto webpage
|
//opens the howto webpage
|
||||||
public void howtoEntry(View view){
|
public void howtoEntry(View view){
|
||||||
try{
|
try{
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/projects/morse/index.html#howto_android"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/writtenmorse/#howto_android"));
|
||||||
startActivity(browserIntent);
|
startActivity(browserIntent);
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -24,18 +24,35 @@
|
||||||
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="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:paddingRight="150dp"
|
|
||||||
android:paddingLeft="150dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#fff"
|
|
||||||
tools:context=".AboutActivity$PlaceholderFragment">
|
tools:context=".AboutActivity$PlaceholderFragment">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/wml_back"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="400px"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/LinearLayoutListContainer"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginRight="125dp"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:layout_marginLeft="125dp"
|
||||||
|
android:layout_gravity="top"
|
||||||
|
android:elevation="2dp">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:id="@+id/scrollView">
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/LinearLayoutListContainer">
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/LinearLayoutList"
|
style="@style/LinearLayoutList"
|
||||||
|
@ -185,9 +202,10 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -1,14 +1,25 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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">
|
||||||
android:paddingRight="150dp"
|
|
||||||
android:paddingLeft="150dp">
|
<RelativeLayout
|
||||||
|
android:id="@+id/wml_back"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="400px"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/wm_recycler"
|
android:id="@+id/wm_recycler"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginRight="125dp"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:layout_marginLeft="125dp"
|
||||||
|
android:layout_gravity="top"
|
||||||
|
android:elevation="2dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
|
@ -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.1 \n16. Mai 2015</string>
|
<string name="aboutVersion">2.2.4 \n20. 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>
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
<item name="colorAccent">@color/colorPrimary</item>
|
<item name="colorAccent">@color/colorPrimary</item>
|
||||||
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
|
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
|
||||||
<item name="rippleBackport">true</item>
|
<item name="rippleBackport">true</item>
|
||||||
<item name="toolbarElevation">true</item>
|
|
||||||
<item name="android:windowTranslucentStatus">true</item>
|
<item name="android:windowTranslucentStatus">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -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.1 \n16 May 2015</string>
|
<string name="aboutVersion">2.2.4 \n20 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>
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
<item name="colorAccent">@color/colorPrimary</item>
|
<item name="colorAccent">@color/colorPrimary</item>
|
||||||
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
|
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
|
||||||
<item name="rippleBackport">true</item>
|
<item name="rippleBackport">true</item>
|
||||||
<item name="toolbarElevation">true</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="LinearLayoutList">
|
<style name="LinearLayoutList">
|
||||||
|
@ -40,7 +39,6 @@
|
||||||
<item name="android:paddingBottom">20dp</item>
|
<item name="android:paddingBottom">20dp</item>
|
||||||
<item name="android:paddingLeft">16dp</item>
|
<item name="android:paddingLeft">16dp</item>
|
||||||
<item name="android:paddingRight">16dp</item>
|
<item name="android:paddingRight">16dp</item>
|
||||||
<item name="android:gravity">center</item>
|
|
||||||
<item name="android:orientation">vertical</item>
|
<item name="android:orientation">vertical</item>
|
||||||
<item name="android:background">@drawable/linearlayout_action</item>
|
<item name="android:background">@drawable/linearlayout_action</item>
|
||||||
<item name="android:src">@color/white</item>
|
<item name="android:src">@color/white</item>
|
||||||
|
@ -50,8 +48,8 @@
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:orientation">vertical</item>
|
<item name="android:orientation">vertical</item>
|
||||||
<item name="android:layout_marginTop">8dp</item>
|
<item name="android:layout_marginTop">50dp</item>
|
||||||
<item name="android:layout_marginBottom">8dp</item>
|
<item name="android:layout_marginBottom">50dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Divider">
|
<style name="Divider">
|
||||||
|
|
Reference in a new issue