Multiple Line support, Fixed issus with appcompat 22

This commit is contained in:
mmk2410 2015-08-03 15:36:59 +02:00
parent 4f25216ce8
commit adccce2f14
20 changed files with 962 additions and 652 deletions

View file

@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />

View file

@ -12,10 +12,12 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
<task>generateDebugTestSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
@ -24,7 +26,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
@ -85,15 +87,15 @@
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 22 Platform (1)" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
<orderEntry type="library" exported="" name="MaterialNavigationDrawer-1.3.3" level="project" />
<orderEntry type="library" exported="" name="material-ripple-1.0.1" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="library-1.0.24" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
<orderEntry type="library" exported="" name="library-1.0.26" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-22.2.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-22.2.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
</component>
</module>

View file

@ -26,10 +26,10 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.+'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'it.neokree:MaterialNavigationDrawer:1.3.3'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:support-v4:22.0.+'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
}

View file

@ -25,28 +25,17 @@ 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.graphics.Point;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Surface;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import com.anjlab.android.iab.v3.BillingProcessor;
import com.anjlab.android.iab.v3.TransactionDetails;
import de.marcelkapfer.morseconverter.engine.DecodeNormalMorseManager;
import de.marcelkapfer.morseconverter.engine.DecodeWrittenMorseManager;
import de.marcelkapfer.morseconverter.engine.EncodeNormalMorseManager;
import de.marcelkapfer.morseconverter.engine.EncodeWrittenMorseManager;
import de.marcelkapfer.morseconverter.fragments.AboutFragment;
import de.marcelkapfer.morseconverter.fragments.MainFragment;
import de.marcelkapfer.morseconverter.fragments.MorseFragment;
@ -120,19 +109,18 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
}
public void onDrawerOpened(View view) {
super.onDrawerOpened(view);
// This closes the soft keyboard, when the drawer is opened
try {
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
super.onDrawerOpened(view);
}
};
this.setDrawerListener(mDrawerToggle);
}
// IBillingHandler implementation
@ -176,7 +164,6 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
public void onDestroy() {
if (bp != null)
bp.release();
super.onDestroy();
}
@ -192,187 +179,17 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro
}
}
public void normalMorseEncode(View view){
try{
EditText input = (EditText) findViewById(R.id.editTextNormalMorse);
TextView output = (TextView) findViewById(R.id.outputNormalMorse);
CardView cardView = (CardView) findViewById(R.id.cardViewNormalMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(EncodeNormalMorseManager.getEncodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void normalMorseDecode(View view){
try {
EditText input = (EditText) findViewById(R.id.editTextNormalMorse);
TextView output = (TextView) findViewById(R.id.outputNormalMorse);
CardView cardView = (CardView) findViewById(R.id.cardViewNormalMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(DecodeNormalMorseManager.getDecodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void writtenMorseEncode(View view){
try {
EditText input = (EditText) findViewById(R.id.editTextWrittenMorse);
TextView output = (TextView) findViewById(R.id.outputWrittenMorse);
CardView cardView = (CardView) findViewById(R.id.cardViewWrittenMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(EncodeWrittenMorseManager.getEncodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void writtenMorseDecode(View view){
try {
EditText input = (EditText) findViewById(R.id.editTextWrittenMorse);
TextView output = (TextView) findViewById(R.id.outputWrittenMorse);
CardView cardView = (CardView) findViewById(R.id.cardViewWrittenMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(DecodeWrittenMorseManager.getDecodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
//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/writtenmorse
public void websiteEntry(View view){
try{
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/writtenmorse/"));
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/writtenmorse/#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();
}
}
public void shareWrittenMorse(View view){
TextView message = (TextView) findViewById(R.id.outputWrittenMorse);
share(message.getText().toString());
}
public void shareNormalMorse(View view){
TextView message = (TextView) findViewById(R.id.outputNormalMorse);
share(message.getText().toString());
}
public void share(String string){
public static void share(String string, FragmentActivity fragmentActivity){
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, string);
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));
fragmentActivity.startActivity(Intent.createChooser(sendIntent, fragmentActivity.getResources().getText(R.string.send_to)));
}
public void copyWrittenMorse(View view){
TextView message = (TextView) findViewById(R.id.outputWrittenMorse);
copy(message.getText().toString());
}
public void copyNormalMorse(View view){
TextView message = (TextView) findViewById(R.id.outputNormalMorse);
copy(message.getText().toString());
}
public void copy(String string){
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
public static void copy(String string, FragmentActivity fragmentActivity){
ClipboardManager clipboard = (ClipboardManager) fragmentActivity.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Message", string);
clipboard.setPrimaryClip(clip);
}
}

View file

@ -1,7 +1,7 @@
package de.marcelkapfer.morseconverter.engine;
/*
This is a Android application for converting writtenMorse and normal morse code.
This is a Java 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
@ -63,6 +63,9 @@ public class DecodeNormalMorseManager {
}
output.append(" ");
input.delete(0, 1);
} else if(input.toString().startsWith("\n")) {
output.append("\n");
input.deleteCharAt(input.indexOf("\n"));
} else if (input.toString().startsWith("A")) {
output.append(".- ");
input.delete(0, 1);
@ -232,7 +235,7 @@ public class DecodeNormalMorseManager {
output.append("...-..- ");
input.delete(0, 1);
} else {
output.replace(0, output.length(), "Code not listed or wrong.");
return "Code not listed or wrong.";
}
}
if (output.toString().endsWith(" ")) {

View file

@ -1,7 +1,7 @@
package de.marcelkapfer.morseconverter.engine;
/*
This is a Android application for converting writtenMorse and normal morse code.
This is a Java 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
@ -56,7 +56,7 @@ public class DecodeWrittenMorseManager {
} else if (input.toString().equals("WORD SPACE")) {
output.replace(0, output.length(), "+");
} else {
for (int c = input.length(); c > 0; c--) {
while (input.length() > 0) {
if (input.toString().startsWith(" ")) {
if (output.toString().endsWith("#")) {
@ -64,6 +64,9 @@ public class DecodeWrittenMorseManager {
}
output.append("+");
input.delete(0, 1);
} else if (input.toString().startsWith("\n")) {
output.append("\n");
input.deleteCharAt(input.indexOf("\n"));
} else if (input.toString().startsWith("A")) {
output.append("01#");
input.delete(0, 1);
@ -233,7 +236,7 @@ public class DecodeWrittenMorseManager {
output.append("0001001#");
input.delete(0, 1);
} else {
output.replace(0, output.length(), "Code not listed or wrong.");
return "Code not listed or wrong.";
}
}
if (output.toString().endsWith("#")) {

View file

@ -1,7 +1,7 @@
package de.marcelkapfer.morseconverter.engine;
/*
This is a Android application for converting writtenMorse and normal morse code.
This is a Java 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
@ -49,7 +49,12 @@ public class EncodeNormalMorseManager {
if (inputToSign.toString().startsWith(" ")) {
output.append(" ");
inputToSign.delete(d, d + 7);
} else if (inputToSign.toString().substring(d, d + 3).equals(" ")) {
}
if (inputToSign.toString().startsWith("\n")) {
output.append("\n");
inputToSign.deleteCharAt(inputToSign.indexOf("\n"));
}
if (inputToSign.toString().substring(d, d + 3).equals(" ")) {
if (d == 0) {
inputToSign.delete(0, 3);
} else {
@ -115,9 +120,9 @@ public class EncodeNormalMorseManager {
} else if (sign.toString().equals("--..")) {
output.append("Z");
} else if (sign.toString().equals("-----")) {
output.append(". (zero)");
output.append("0");
} else if (sign.toString().equals(".----")) {
output.append("-");
output.append("1");
} else if (sign.toString().equals("..---")) {
output.append("2");
} else if (sign.toString().equals("...--")) {
@ -187,7 +192,7 @@ public class EncodeNormalMorseManager {
} else if (sign.toString().equals("........")) {
output.append("Error");
} else {
output.replace(0, output.length(), "Code not listed or wrong.");
return "Code not listed or wrong.";
}
}
return output.toString();

View file

@ -1,7 +1,7 @@
package de.marcelkapfer.morseconverter.engine;
/*
This is a Android application for converting writtenMorse and normal morse code.
This is a Java 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
@ -46,12 +46,21 @@ public class EncodeWrittenMorseManager {
StringBuffer sign = new StringBuffer();
while (signFull) {
if (inputToSign.toString().charAt(d) == '+'
|| inputToSign.toString().charAt(d) == '#') {
|| inputToSign.toString().charAt(d) == '#'
|| inputToSign.toString().startsWith("\n")) {
if (d == 0) {
if (inputToSign.toString().startsWith("+")) {
output.append(" ");
}
inputToSign.deleteCharAt(0);
}
if (inputToSign.toString().startsWith("#")) {
inputToSign.deleteCharAt(0);
}
// Line break support
if (inputToSign.toString().startsWith("\n")) { // Detect line break
output.append("\n"); // Add line break to the output
inputToSign.deleteCharAt(inputToSign.indexOf("\n")); // Remove line break from the input
}
} else {
sign.replace(0, sign.length(), inputToSign
.toString().substring(0, d));
@ -115,7 +124,7 @@ public class EncodeWrittenMorseManager {
} else if (sign.toString().equals("1100")) {
output.append("Z");
} else if (sign.toString().equals("11111")) {
output.append("0 (zero)");
output.append("0");
} else if (sign.toString().equals("01111")) {
output.append("1");
} else if (sign.toString().equals("00111")) {
@ -187,7 +196,7 @@ public class EncodeWrittenMorseManager {
} else if (sign.toString().equals("00000000")) {
output.append("Error");
} else {
output.replace(0, output.length(), "Code not listed or wrong.");
return "Code not listed or wrong.";
}
}
return output.toString();

View file

@ -21,11 +21,14 @@ package de.marcelkapfer.morseconverter.fragments;
*/
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import de.marcelkapfer.morseconverter.R;
@ -37,4 +40,171 @@ public class AboutFragment extends Fragment{
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
return inflater.inflate(R.layout.fragment_about, container, false);
}
@Override
public void onStart(){
LinearLayout versionEntryButton = (LinearLayout) getActivity().findViewById(R.id.versionEntry);
versionEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
versionEntry();
}
});
LinearLayout developerEntryButton = (LinearLayout) getActivity().findViewById(R.id.developerEntry);
developerEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
developerEntry();
}
});
LinearLayout websiteEntryButton = (LinearLayout) getActivity().findViewById(R.id.websiteEntry);
websiteEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
websiteEntry();
}
});
LinearLayout contactEntryButton = (LinearLayout) getActivity().findViewById(R.id.contactEntry);
contactEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
contactEntry();
}
});
LinearLayout licenseEntryButton = (LinearLayout) getActivity().findViewById(R.id.licenseEntry);
licenseEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
licenseEntry();
}
});
LinearLayout bugEntryButton = (LinearLayout) getActivity().findViewById(R.id.bugEntry);
bugEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
bugEntry();
}
});
LinearLayout howtoEntryButton = (LinearLayout) getActivity().findViewById(R.id.howtoEntry);
howtoEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
howtoEntry();
}
});
LinearLayout missingCodeEntryButton = (LinearLayout) getActivity().findViewById(R.id.missingCodeEntry);
missingCodeEntryButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
missingCodeEntry();
}
});
super.onStart();
}
//called when clicking on the version entry in the about fragment
//opens the app page (de.marcelkapfer.morseconverter)
public void versionEntry(){
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(){
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/writtenmorse
public void websiteEntry(){
try{
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/writtenmorse/"));
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(){
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(){
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(){
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(){
try{
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://marcel-kapfer.de/writtenmorse/#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(){
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();
}
}
}

View file

@ -21,13 +21,23 @@ package de.marcelkapfer.morseconverter.fragments;
*/
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import de.marcelkapfer.morseconverter.MainActivity;
import de.marcelkapfer.morseconverter.R;
import de.marcelkapfer.morseconverter.engine.DecodeWrittenMorseManager;
import de.marcelkapfer.morseconverter.engine.EncodeWrittenMorseManager;
/**
* Created by mmk on 2/14/15.
@ -37,4 +47,94 @@ public class MainFragment extends Fragment{
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
return inflater.inflate(R.layout.fragment_main, container, false);
}
@Override
public void onStart() {
LinearLayout writtenMorseDecodeButton = (LinearLayout) getActivity().findViewById(R.id.writtenMorseDecodeButton);
writtenMorseDecodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
writtenMorseDecode(getActivity());
}
});
LinearLayout writtenMorseEncodeButton = (LinearLayout) getActivity().findViewById(R.id.writtenMorseEncodeButton);
writtenMorseEncodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
writtenMorseEncode(getActivity());
}
});
LinearLayout writtenMorseCopy = (LinearLayout) getActivity().findViewById(R.id.copyWrittenMorse);
writtenMorseCopy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
copyWrittenMorse(getActivity());
}
});
LinearLayout writtenMorseShare = (LinearLayout) getActivity().findViewById(R.id.shareWrittenMorse);
writtenMorseShare.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
shareWrittenMorse(getActivity());
}
});
super.onStart();
}
public void writtenMorseEncode(FragmentActivity fragmentActivity){
try {
EditText input = (EditText) fragmentActivity.findViewById(R.id.editTextWrittenMorse);
TextView output = (TextView) fragmentActivity.findViewById(R.id.outputWrittenMorse);
CardView cardView = (CardView) fragmentActivity.findViewById(R.id.cardViewWrittenMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(EncodeWrittenMorseManager.getEncodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void writtenMorseDecode(FragmentActivity fragmentActivity){
try {
EditText input = (EditText) fragmentActivity.findViewById(R.id.editTextWrittenMorse);
TextView output = (TextView) fragmentActivity.findViewById(R.id.outputWrittenMorse);
CardView cardView = (CardView) fragmentActivity.findViewById(R.id.cardViewWrittenMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(DecodeWrittenMorseManager.getDecodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void copyWrittenMorse(FragmentActivity fragmentActivity){
TextView message = (TextView) fragmentActivity.findViewById(R.id.outputWrittenMorse);
MainActivity.copy(message.getText().toString(), fragmentActivity);
}
public void shareWrittenMorse(FragmentActivity fragmentActivity){
TextView message = (TextView) fragmentActivity.findViewById(R.id.outputWrittenMorse);
MainActivity.share(message.getText().toString(), fragmentActivity);
}
public void closeKeyboard(){
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
EditText myEditText = (EditText) getActivity().findViewById(R.id.editTextWrittenMorse);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
}
}

View file

@ -21,13 +21,24 @@ package de.marcelkapfer.morseconverter.fragments;
*/
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import de.marcelkapfer.morseconverter.MainActivity;
import de.marcelkapfer.morseconverter.R;
import de.marcelkapfer.morseconverter.engine.DecodeNormalMorseManager;
import de.marcelkapfer.morseconverter.engine.EncodeNormalMorseManager;
/**
* Created by mmk on 2/14/15.
@ -37,4 +48,94 @@ public class MorseFragment extends Fragment{
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
return inflater.inflate(R.layout.fragment_morse, container, false);
}
@Override
public void onStart() {
LinearLayout normalMorseDecodeButton = (LinearLayout) getActivity().findViewById(R.id.normalMorseDecodeButton);
normalMorseDecodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
normalMorseDecode(getActivity());
}
});
LinearLayout normalMorseEncodeButton = (LinearLayout) getActivity().findViewById(R.id.normalMorseEncodeButton);
normalMorseEncodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
normalMorseEncode(getActivity());
}
});
LinearLayout normalMorseCopy = (LinearLayout) getActivity().findViewById(R.id.copyNormalMorse);
normalMorseCopy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
copyNormalMorse(getActivity());
}
});
LinearLayout normalMorseShare = (LinearLayout) getActivity().findViewById(R.id.shareNormalMorse);
normalMorseShare.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
shareNormalMorse(getActivity());
}
});
super.onStart();
}
public void normalMorseDecode(FragmentActivity fragmentActivity){
try {
EditText input = (EditText) fragmentActivity.findViewById(R.id.editTextNormalMorse);
TextView output = (TextView) fragmentActivity.findViewById(R.id.outputNormalMorse);
CardView cardView = (CardView) fragmentActivity.findViewById(R.id.cardViewNormalMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(DecodeNormalMorseManager.getDecodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void normalMorseEncode(FragmentActivity fragmentActivity){
try {
EditText input = (EditText) fragmentActivity.findViewById(R.id.editTextNormalMorse);
TextView output = (TextView) fragmentActivity.findViewById(R.id.outputNormalMorse);
CardView cardView = (CardView) fragmentActivity.findViewById(R.id.cardViewNormalMorseOutput);
if(cardView.getVisibility() == View.INVISIBLE){
cardView.setVisibility(View.VISIBLE);
}
output.setText(EncodeNormalMorseManager.getEncodedString(input.getText().toString()));
closeKeyboard();
} catch (Exception e){
e.printStackTrace();
}
}
public void copyNormalMorse(FragmentActivity fragmentActivity){
TextView message = (TextView) fragmentActivity.findViewById(R.id.outputNormalMorse);
MainActivity.copy(message.getText().toString(), fragmentActivity);
}
public void shareNormalMorse(FragmentActivity fragmentActivity){
TextView message = (TextView) fragmentActivity.findViewById(R.id.outputNormalMorse);
MainActivity.share(message.getText().toString(), fragmentActivity);
}
public void closeKeyboard(){
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
EditText myEditText = (EditText) getActivity().findViewById(R.id.editTextNormalMorse);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
}
}

View file

@ -56,149 +56,174 @@
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="versionEntry">
android:id="@+id/versionEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionVersion"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutVersion" />
android:text="@string/aboutVersion"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="developerEntry">
android:id="@+id/developerEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionDeveloper"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutDeveloper" />
android:text="@string/aboutDeveloper"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="websiteEntry">
android:id="@+id/websiteEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionWebsite"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutWebsite" />
android:text="@string/aboutWebsite"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="contactEntry">
android:id="@+id/contactEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionContact"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutContact" />
android:text="@string/aboutContact"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="licenseEntry">
android:id="@+id/licenseEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionLicense"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutLicense" />
android:text="@string/aboutLicense"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="bugEntry">
android:id="@+id/bugEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionBug"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutBug" />
android:text="@string/aboutBug"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="howtoEntry">
android:id="@+id/howtoEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionHow"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutHow" />
android:text="@string/aboutHow"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="missingCodeEntry">
android:paddingBottom="70dp"
android:id="@+id/missingCodeEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionMissing"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutMissing"/>
android:text="@string/aboutMissing"
android:textColor="@color/primary_text_default_material_light"/>
</LinearLayout>

View file

@ -70,13 +70,14 @@
android:scrollbars="vertical"
android:minLines="5"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"
android:textColorHint="@color/hint_foreground_material_light"/>
<View
style="@style/Divider"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
@ -92,7 +93,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="writtenMorseDecode" >
android:id="@+id/writtenMorseDecodeButton"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -102,8 +104,9 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="writtenMorseEncode"
android:text="@string/button_encode" >
android:text="@string/button_encode"
android:id="@+id/writtenMorseEncodeButton"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -161,7 +164,8 @@
android:gravity="center_vertical"
android:hint="@string/output_message"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"/>
<View
style="@style/Divider"
@ -182,7 +186,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="copyWrittenMorse" >
android:id="@+id/copyWrittenMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -192,7 +197,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="shareWrittenMorse" >
android:id="@+id/shareWrittenMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"

View file

@ -70,7 +70,9 @@
android:ems="10"
android:hint="@string/edit_message"
android:background="@color/cardview_light_background"
android:minLines="5">
android:minLines="5"
android:textColor="@color/primary_text_default_material_light"
android:textColorHint="@color/hint_foreground_material_light">
</EditText>
<View
@ -90,8 +92,9 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="normalMorseDecode"
android:layout_marginRight="8dp">
android:layout_marginRight="8dp"
android:clickable="true"
android:id="@+id/normalMorseDecodeButton">
<TextView
style="@style/LinearLayoutButtonText"
@ -101,8 +104,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="normalMorseEncode">
android:clickable="true"
android:id="@+id/normalMorseEncodeButton" >
<TextView
style="@style/LinearLayoutButtonText"
android:text="@string/button_encode" />
@ -162,7 +165,8 @@
android:hint="@string/output_message"
android:scrollbars="vertical"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"/>
<View
style="@style/Divider"
@ -183,8 +187,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="copyNormalMorse" >
android:id="@+id/copyNormalMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
android:text="@string/button_copy" />
@ -193,7 +197,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="shareNormalMorse" >
android:id="@+id/shareNormalMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"

View file

@ -40,149 +40,174 @@
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="versionEntry">
android:id="@+id/versionEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionVersion"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutVersion" />
android:text="@string/aboutVersion"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="developerEntry">
android:id="@+id/developerEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionDeveloper"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutDeveloper" />
android:text="@string/aboutDeveloper"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="websiteEntry">
android:id="@+id/websiteEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionWebsite"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutWebsite" />
android:text="@string/aboutWebsite"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="contactEntry">
android:id="@+id/contactEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionContact"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutContact" />
android:text="@string/aboutContact"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="licenseEntry">
android:id="@+id/licenseEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionLicense"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutLicense" />
android:text="@string/aboutLicense"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="bugEntry">
android:id="@+id/bugEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionBug"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutBug" />
android:text="@string/aboutBug"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="howtoEntry">
android:id="@+id/howtoEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionHow"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutHow" />
android:text="@string/aboutHow"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="missingCodeEntry">
android:paddingBottom="70dp"
android:id="@+id/missingCodeEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionMissing"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutMissing"/>
android:text="@string/aboutMissing"
android:textColor="@color/primary_text_default_material_light"/>
</LinearLayout>

View file

@ -9,7 +9,8 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/hello_world"
android:gravity="center_vertical"/>
android:gravity="center_vertical"
android:textColor="@color/primary_text_default_material_light"/>
<TextView
android:id="@+id/codefield"
@ -17,6 +18,7 @@
android:layout_height="match_parent"
android:text="@string/hello_world"
android:layout_gravity="right"
android:gravity="center_vertical"/>
android:gravity="center_vertical"
android:textColor="@color/primary_text_default_material_light"/>
</FrameLayout>

View file

@ -46,150 +46,174 @@
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="versionEntry">
android:id="@+id/versionEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionVersion"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutVersion" />
android:text="@string/aboutVersion"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="developerEntry">
android:id="@+id/developerEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionDeveloper"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutDeveloper" />
android:text="@string/aboutDeveloper"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="websiteEntry">
android:id="@+id/websiteEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionWebsite"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutWebsite" />
android:text="@string/aboutWebsite"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="contactEntry">
android:id="@+id/contactEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionContact"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutContact" />
android:text="@string/aboutContact"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="licenseEntry">
android:id="@+id/licenseEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionLicense"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/aboutLicense" />
android:text="@string/aboutLicense"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="bugEntry">
android:id="@+id/bugEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionBug"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutBug" />
android:text="@string/aboutBug"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:onClick="howtoEntry">
android:id="@+id/howtoEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionHow"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutHow" />
android:text="@string/aboutHow"
android:textColor="@color/primary_text_default_material_light" />
</LinearLayout>
<LinearLayout
style="@style/LinearLayoutList"
android:paddingBottom="70dp"
android:onClick="missingCodeEntry">
android:id="@+id/missingCodeEntry"
android:clickable="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/sectionMissing"
android:textColor="@color/primary_text_default_material_light"
/>
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/aboutMissing"/>
android:text="@string/aboutMissing"
android:textColor="@color/primary_text_default_material_light"/>
</LinearLayout>

View file

@ -69,7 +69,9 @@
android:scrollbars="vertical"
android:minLines="5"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"
android:textColorHint="@color/hint_foreground_material_light"/>
<View
style="@style/Divider"
@ -90,7 +92,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="writtenMorseDecode" >
android:id="@+id/writtenMorseDecodeButton"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -100,8 +103,9 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="writtenMorseEncode"
android:text="@string/button_encode" >
android:text="@string/button_encode"
android:id="@+id/writtenMorseEncodeButton"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -147,7 +151,8 @@
android:gravity="center_vertical"
android:hint="@string/output_message"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"/>
<View
style="@style/Divider"
@ -168,7 +173,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="copyWrittenMorse" >
android:id="@+id/copyWrittenMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
@ -178,7 +184,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="shareWrittenMorse" >
android:id="@+id/shareWrittenMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"

View file

@ -69,7 +69,9 @@
android:ems="10"
android:hint="@string/edit_message"
android:background="@color/cardview_light_background"
android:minLines="5">
android:minLines="5"
android:textColor="@color/primary_text_default_material_light"
android:textColorHint="@color/hint_foreground_material_light">
</EditText>
<View
@ -89,8 +91,9 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="normalMorseDecode"
android:layout_marginRight="8dp">
android:layout_marginRight="8dp"
android:clickable="true"
android:id="@+id/normalMorseDecodeButton">
<TextView
style="@style/LinearLayoutButtonText"
@ -100,8 +103,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="normalMorseEncode">
android:clickable="true"
android:id="@+id/normalMorseEncodeButton" >
<TextView
style="@style/LinearLayoutButtonText"
android:text="@string/button_encode" />
@ -147,7 +150,8 @@
android:hint="@string/output_message"
android:scrollbars="vertical"
android:singleLine="false"
android:background="@color/cardview_light_background"/>
android:background="@color/cardview_light_background"
android:textColor="@color/primary_text_default_material_light"/>
<View
style="@style/Divider"
@ -168,8 +172,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:layout_marginRight="8dp"
android:onClick="copyNormalMorse" >
android:id="@+id/copyNormalMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"
android:text="@string/button_copy" />
@ -178,7 +182,8 @@
<LinearLayout
style="@style/LinearLayoutButton"
android:onClick="shareNormalMorse" >
android:id="@+id/shareNormalMorse"
android:clickable="true">
<TextView
style="@style/LinearLayoutButtonText"

View file

@ -54,6 +54,7 @@
<!--Drawer Titles-->
<string name="about">About</string>
<string name="normalMorse">Normal Morse</string>
<string name="writtenMorse" translatable="false">writtenMorse</string>
<!--Output Text Buttons-->
<string name="button_share">SHARE</string>
<string name="button_copy">COPY</string>