diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 684e306..721257e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -34,8 +34,10 @@
-
+
+
+
@@ -59,14 +61,14 @@
-
+
-
-
+
+
-
-
+
+
@@ -74,41 +76,34 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
@@ -118,7 +113,7 @@
-
+
@@ -128,25 +123,18 @@
-
+
-
-
-
-
-
-
-
-
-
+
+
@@ -154,45 +142,45 @@
-
-
-
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -816,10 +804,10 @@
-
-
+
+
@@ -855,7 +843,8 @@
-
+
+
@@ -998,8 +987,7 @@
-
-
+
@@ -1212,15 +1200,39 @@
1423963567259
1423963567259
-
+
+ 1423963762218
+ 1423963762218
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -1229,7 +1241,7 @@
-
+
@@ -1301,7 +1313,9 @@
-
+
+
+
@@ -1309,30 +1323,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
@@ -1346,7 +1385,6 @@
-
@@ -1378,56 +1416,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
@@ -1444,7 +1481,6 @@
-
@@ -1476,56 +1512,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
@@ -1547,46 +1582,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -1596,15 +1628,15 @@
-
-
-
+
+
+
@@ -1618,8 +1650,8 @@
-
-
+
+
@@ -1641,46 +1673,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -1690,15 +1719,15 @@
-
-
-
+
+
+
@@ -1708,15 +1737,15 @@
-
-
-
+
+
+
@@ -1737,7 +1766,6 @@
-
@@ -1745,7 +1773,6 @@
-
@@ -1758,50 +1785,38 @@
-
-
-
+
+
+
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
@@ -1809,61 +1824,66 @@
-
+
-
+
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java
index d8e39d4..3db85a7 100644
--- a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java
+++ b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java
@@ -4,33 +4,122 @@ import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
+import android.view.View;
+
import it.neokree.materialnavigationdrawer.MaterialNavigationDrawer;
import it.neokree.materialnavigationdrawer.elements.MaterialSection;
public class MainActivity extends MaterialNavigationDrawer {
+ //Declaring the Material Sections
private MaterialSection writtenMorse, normalMorse, about;
+ //The MaterialNavigationDrawer init() methode replaces the normal onCreate() methode
@Override
public void init(Bundle savedInstanceState) {
Resources res = getResources();
+ //Declaring the Material Sections
writtenMorse = this.newSection("writtenMorse", new MainFragment());
normalMorse = this.newSection(res.getString(R.string.normalMorse), new MorseFragment());
about = this.newSection(res.getString(R.string.about), new AboutFragment());
+ //Adding the Sections
this.addSection(writtenMorse);
this.addSection(normalMorse);
this.addDivisor();
this.addSection(about);
+ //set drawer image
+ //TODO create 16:9 image
this.setDrawerHeaderImage(this.getResources().getDrawable(R.drawable.feature_graphics));
- allowArrowAnimation();
- this.disableLearningPattern();
+ allowArrowAnimation(); //Drawer Arrow rotations
+ this.disableLearningPattern(); //Doesn't open the drawer always when the app starts
}
- public void developerProfile(){
- Intent gplusProfile = new Intent(Intent.ACTION_VIEW, Uri.parse("https://plus.google.com/+MarcelMichaelKapfer/posts"));
- startActivity(gplusProfile);
+ //called when clicking on the version entry in the about fragment
+ //opens the app page (de.marcelkapfer.morseconverter)
+ public void versionEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=de.marcelkapfer.morseconverter"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
}
+ //called when clicking on the developer entry in the about fragment
+ //opens the gplus profile of +MarcelMichaelKapfer
+ public void developerEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://plus.google.com/+MarcelMichaelKapfer/posts"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+ //called when clicking on the website entry in the about fragment
+ //opens marcel-kapfer.de/projects/morse/
+ public void websiteEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/projects/morse/"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ //called when clicking on the contact entry in the about fragment
+ //opens mail app with mail to marcelmichaelkapfer@yahoo.co.nz
+ public void contactEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:marcelmichaelkapfer@yahoo.co.nz"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ //called when clicking on the license entry in the about fragment
+ //opens the license web page
+ public void licenseEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://gnu.org/copyleft/gpl.html"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ //called when clicking on the developer entry in the about fragment
+ //opens mail app with mail to marcelmichaelkapfer@yahoo.co.nz
+ public void bugEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:marcelmichaelkapfer@yahoo.co.nz?subject=Bug Report"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ //called when clicking on the developer entry in the about fragment
+ //opens the howto webpage
+ public void howtoEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/projects/morse/index.html#howto_android"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ //called when clicking on the developer entry in the about fragment
+ //opens mail app with mail to marcelmichaelkapfer@yahoo.co.nz
+ public void missingCodeEntry(View view){
+ try{
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:marcelmichaelkapfer@yahoo.co.nz?subject=Missing Code"));
+ startActivity(browserIntent);
+ } catch(Exception e){
+ e.printStackTrace();
+ }
+ }
}
diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml
index 632eaa3..1e5ba87 100644
--- a/app/src/main/res/layout/fragment_about.xml
+++ b/app/src/main/res/layout/fragment_about.xml
@@ -37,7 +37,8 @@
style="@style/LinearLayoutListContainer">
+ style="@style/LinearLayoutList"
+ android:onClick="versionEntry">
+ android:onClick="developerEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="websiteEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="contactEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="licenseEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="bugEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="howtoEntry">
+ style="@style/LinearLayoutList"
+ android:onClick="missingCodeEntry">
wrap_content
- vertical
- 8dp
- - 8dp
+ - 8dp
- 16dp
- 16dp