Updated to 0.1.9, added backwards compatibility to api 10, added option to share/receive configs via qr-code, added number spelling in spanish, italian

This commit is contained in:
VanitasVitae 2015-10-09 00:57:54 +02:00
parent 992c9a924d
commit 8cd2b6467b
42 changed files with 399 additions and 151 deletions

View file

@ -4,10 +4,11 @@ v0.1.9-not-yet-released<
*Prevent user from setting incomplete reflector wiring *Prevent user from setting incomplete reflector wiring
*Add option to generate configuration from passphrase *Add option to generate configuration from passphrase
*Reworked Enigma definition (available Rotors/Reflectors/Entrywheels *Reworked Enigma definition (available Rotors/Reflectors/Entrywheels
*Verified correct functionality of Enigma T *Completely verified correct functionality of Enigma T
*Added number spelling in spanish, italian
*Added backwards compatibility to Api level 10
*TODO: Write tests to ensure correct functionality *TODO: Write tests to ensure correct functionality
*TODO: Migrate preferences to SettingsActivity *TODO: Migrate preferences to SettingsActivity
*TODO: Add Enigma Z (Probably wont happen due to lack of information :/)
*TODO: Add multi-Enigma (select any rotor/reflector etc. Probably wont happen too soon) *TODO: Add multi-Enigma (select any rotor/reflector etc. Probably wont happen too soon)
v0.1.8-27.09.2015< v0.1.8-27.09.2015<

View file

@ -71,7 +71,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@ -89,7 +89,7 @@
</content> </content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" /> <orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" /> <orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" />
</component> </component>
</module> </module>

View file

@ -6,10 +6,10 @@ android {
defaultConfig { defaultConfig {
applicationId "de.vanitasvitae.enigmandroid" applicationId "de.vanitasvitae.enigmandroid"
minSdkVersion 16 minSdkVersion 10
targetSdkVersion 23 targetSdkVersion 23
versionCode 14 versionCode 15
versionName "0.1.8-27.09.2015-beta" versionName "0.1.9-09.10.2015-beta"
} }
buildTypes { buildTypes {
release { release {
@ -19,5 +19,5 @@ android {
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.0.0' compile 'com.android.support:support-v4:23.0.1'
} }

View file

@ -104,7 +104,7 @@ public class MainActivity extends Activity
switch (prefMachineType) switch (prefMachineType)
{ {
case "I": case "I":
this.setContentView(R.layout.activity_main_i_m3); setContentView(R.layout.activity_main_i_m3);
break; break;
case "M3": case "M3":
this.setContentView(R.layout.activity_main_i_m3); this.setContentView(R.layout.activity_main_i_m3);
@ -328,7 +328,7 @@ public class MainActivity extends Activity
builder.setTitle(R.string.title_about_dialog); builder.setTitle(R.string.title_about_dialog);
builder.setView(aboutView) builder.setView(aboutView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener()
{ {
public void onClick(DialogInterface dialog, int id) public void onClick(DialogInterface dialog, int id)
{ {
@ -383,7 +383,7 @@ public class MainActivity extends Activity
* Set EnigmAndroid into a certain state as described in the QR-Code * Set EnigmAndroid into a certain state as described in the QR-Code
* @param mem content of the QR-Code * @param mem content of the QR-Code
*/ */
private void restoreStateFromCode(String mem) public void restoreStateFromCode(String mem)
{ {
if(!mem.startsWith(APP_ID+"/")) if(!mem.startsWith(APP_ID+"/"))
{ {
@ -393,7 +393,7 @@ public class MainActivity extends Activity
{ {
mem = mem.substring((APP_ID+"/").length()); mem = mem.substring((APP_ID+"/").length());
BigInteger s = new BigInteger(mem, 16); BigInteger s = new BigInteger(mem, 16);
Log.d(APP_ID, s.toString()); Log.d(APP_ID, "Try to restore configuration from BigInteger value "+ s.toString());
setPrefMachineType(Enigma.chooseEnigmaFromSave(s)); setPrefMachineType(Enigma.chooseEnigmaFromSave(s));
updateContentView(); updateContentView();
layoutContainer = LayoutContainer.createLayoutContainer(getPrefMachineType()); layoutContainer = LayoutContainer.createLayoutContainer(getPrefMachineType());

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -38,6 +41,7 @@ public class Enigma_D extends Enigma {
{ {
super(); super();
machineType = "D"; machineType = "D";
Log.d(MainActivity.APP_ID, "Created Enigma D");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -31,6 +34,7 @@ public class Enigma_G260 extends Enigma_G31
{ {
super(); super();
machineType = "G260"; machineType = "G260";
Log.d(MainActivity.APP_ID, "Created Enigma G260");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -37,6 +40,7 @@ public class Enigma_G31 extends Enigma
{ {
super(); super();
machineType = "G31"; machineType = "G31";
Log.d(MainActivity.APP_ID, "Created Enigma G31");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -31,6 +34,7 @@ public class Enigma_G312 extends Enigma_G31
{ {
super(); super();
machineType = "G312"; machineType = "G312";
Log.d(MainActivity.APP_ID, "Created Enigma G312");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -39,6 +42,7 @@ public class Enigma_I extends Enigma
{ {
super(); super();
machineType = "I"; machineType = "I";
Log.d(MainActivity.APP_ID, "Created Enigma I");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -37,6 +40,7 @@ public class Enigma_K extends Enigma
{ {
super(); super();
machineType = "K"; machineType = "K";
Log.d(MainActivity.APP_ID, "Created Enigma K");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -31,6 +34,7 @@ public class Enigma_K_Swiss_Airforce extends Enigma_K
{ {
super(); super();
machineType = "KSA"; machineType = "KSA";
Log.d(MainActivity.APP_ID, "Created Enigma KSA");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -31,6 +34,7 @@ public class Enigma_K_Swiss_Standard extends Enigma_K
{ {
super(); super();
machineType = "KS"; machineType = "KS";
Log.d(MainActivity.APP_ID, "Created Enigma KS");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -31,6 +34,7 @@ public class Enigma_M3 extends Enigma_I
{ {
super(); super();
machineType = "M3"; machineType = "M3";
Log.d(MainActivity.APP_ID, "Created Enigma M3");
} }
@Override @Override

View file

@ -47,6 +47,7 @@ public class Enigma_M4 extends Enigma
{ {
super(); super();
machineType = "M4"; machineType = "M4";
Log.d(MainActivity.APP_ID, "Created Enigma M4");
} }
protected void addAvailableThinRotor(Rotor r) protected void addAvailableThinRotor(Rotor r)

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -38,6 +41,7 @@ public class Enigma_R extends Enigma
{ {
super(); super();
machineType = "R"; machineType = "R";
Log.d(MainActivity.APP_ID, "Created Enigma R");
} }
@Override @Override

View file

@ -1,7 +1,10 @@
package de.vanitasvitae.enigmandroid.enigma; package de.vanitasvitae.enigmandroid.enigma;
import android.util.Log;
import java.math.BigInteger; import java.math.BigInteger;
import de.vanitasvitae.enigmandroid.MainActivity;
import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel; import de.vanitasvitae.enigmandroid.enigma.rotors.EntryWheel;
import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector; import de.vanitasvitae.enigmandroid.enigma.rotors.Reflector;
import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor; import de.vanitasvitae.enigmandroid.enigma.rotors.Rotor;
@ -37,6 +40,7 @@ public class Enigma_T extends Enigma
{ {
super(); super();
machineType = "T"; machineType = "T";
Log.d(MainActivity.APP_ID, "Created Enigma T");
} }
@Override @Override

View file

@ -35,7 +35,7 @@ public class Plugboard
public Plugboard() public Plugboard()
{ {
plugs = empty; plugs = Arrays.copyOf(empty, empty.length);
} }
public Plugboard(int[] conf) public Plugboard(int[] conf)
@ -53,12 +53,11 @@ public class Plugboard
String s = ""; String s = "";
int x; int x;
while((x = Enigma.getValue(b, 27)) != 26 || b.compareTo(BigInteger.ZERO) > 1) while((x = Enigma.getValue(b, 27)) != 26 && b.compareTo(BigInteger.ZERO) > 1)
{ {
s = ((char) (x+65))+s; s = ((char) (x+65))+s;
b = Enigma.removeDigit(b, 27); b = Enigma.removeDigit(b, 27);
} }
Log.d(MainActivity.APP_ID, "Restored: " + s);
this.setConfiguration(stringToConfiguration(s)); this.setConfiguration(stringToConfiguration(s));
return b; return b;
} }
@ -207,9 +206,8 @@ public class Plugboard
public static int[] bigIntegerToConfiguration(BigInteger b) public static int[] bigIntegerToConfiguration(BigInteger b)
{ {
String s = ""; String s = "";
int x; int x;
while((x = Enigma.getValue(b, 27)) != 26 || b.compareTo(BigInteger.ZERO) > 1) while((x = Enigma.getValue(b, 27)) != 26 && b.compareTo(BigInteger.ZERO) > 1)
{ {
s = ((char) (x+65))+s; s = ((char) (x+65))+s;
b = Enigma.removeDigit(b, 27); b = Enigma.removeDigit(b, 27);

View file

@ -56,6 +56,10 @@ public abstract class InputPreparer {
break; break;
case "fr": inPrep = new ReplaceNumbersFrench(inPrep); case "fr": inPrep = new ReplaceNumbersFrench(inPrep);
break; break;
case "sp": inPrep = new ReplaceNumbersSpanish(inPrep);
break;
case "it": inPrep = new ReplaceNumbersItalian(inPrep);
break;
default: default:
break; break;
} }
@ -158,6 +162,60 @@ public abstract class InputPreparer {
} }
} }
/**
* Concrete implementation of a spanish InputPreparer
*/
public static class ReplaceNumbersSpanish extends InputPreparer {
public ReplaceNumbersSpanish() {
this.child = null;
}
public ReplaceNumbersSpanish(InputPreparer child) {
this.child = child;
}
protected String prepare(String input) {
input = input.replace("0", "CERO")
.replace("1", "UNO")
.replace("2", "DOS")
.replace("3", "TRES")
.replace("4", "CUATRO")
.replace("5", "CINCO")
.replace("6", "SEIS")
.replace("7", "SIETE")
.replace("8", "OCHO")
.replace("9", "NUEVE");
return input;
}
}
/**
* Concrete implementation of a spanish InputPreparer
*/
public static class ReplaceNumbersItalian extends InputPreparer {
public ReplaceNumbersItalian() {
this.child = null;
}
public ReplaceNumbersItalian(InputPreparer child) {
this.child = child;
}
protected String prepare(String input) {
input = input.replace("0", "ZERO")
.replace("1", "UNO")
.replace("2", "DUE")
.replace("3", "TRE")
.replace("4", "QUATTRO")
.replace("5", "CINQUE")
.replace("6", "SEI")
.replace("7", "SETTE")
.replace("8", "OTTO")
.replace("9", "NOVE");
return input;
}
}
/** /**
* "Final Stage" of Input preparing. This should always be called last * "Final Stage" of Input preparing. This should always be called last
* (choose this as the inner most capsule of InputPreparers) * (choose this as the inner most capsule of InputPreparers)

View file

@ -67,7 +67,6 @@ public abstract class LayoutContainer
{ {
if(inputView.getText().length()!=0) if(inputView.getText().length()!=0)
{ {
syncStateFromLayoutToEnigma(); syncStateFromLayoutToEnigma();
String message = inputView.getText().toString(); String message = inputView.getText().toString();
message = inputPreparer.prepareString(message); message = inputPreparer.prepareString(message);

View file

@ -47,6 +47,24 @@ public class LayoutContainer_T extends LayoutContainer
this.resetLayout(); this.resetLayout();
} }
@Override
public void doCrypto()
{
if(inputView.getText().length()!=0)
{
syncStateFromLayoutToEnigma();
String message = inputView.getText().toString();
//<Insert funny comment here>
boolean egg = false;
if(message.hashCode() == -1475861192) egg = true;
message = inputPreparer.prepareString(message);
input.setText(message);
if(egg) output.setText("ENIGMA<TURINGMACHINE");
else output.setText(getEnigma().encryptString(message));
setLayoutState(getEnigma().getState());
}
}
@Override @Override
public Enigma getEnigma() { public Enigma getEnigma() {
return this.enigma; return this.enigma;

View file

@ -16,6 +16,8 @@ import de.vanitasvitae.enigmandroid.R;
/** /**
* Builder for the dialog that is used to obtain a passphrase to generate * Builder for the dialog that is used to obtain a passphrase to generate
* a enigma configuration from it. * a enigma configuration from it.
* Alternatively the user can enter the content String from a EnigmAndroid QR-Code here.
* That would have the same effect as scanning the QR-Code.
* Copyright (C) 2015 Paul Schaub * Copyright (C) 2015 Paul Schaub
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -75,18 +77,26 @@ public class PassphraseDialogBuilder
builder.setTitle(R.string.hint_passphrase); builder.setTitle(R.string.hint_passphrase);
Dialog d = builder.setView(passphraseDialogView) Dialog d = builder.setView(passphraseDialogView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener()
{ {
public void onClick(DialogInterface dialog, int id) public void onClick(DialogInterface dialog, int id)
{ {
String pass = passphrase.getText().toString(); String pass = passphrase.getText().toString();
if(pass.startsWith(MainActivity.APP_ID+"/"))
{
main.restoreStateFromCode(pass);
Toast.makeText(main, R.string.dialog_passphrase_was_coded_state, Toast.LENGTH_LONG).show();
}
else
{
main.createStateFromSeed(pass); main.createStateFromSeed(pass);
String message = main.getResources().getString(R.string.dialog_passphrase_set) String message = String.format(main.getResources().getString(
+" \'" + pass + "\'"; R.string.dialog_passphrase_set), " \'"+pass+"\'");
Toast.makeText(main, message, Toast.LENGTH_LONG).show(); Toast.makeText(main, message, Toast.LENGTH_LONG).show();
} }
}
}) })
.setNegativeButton(R.string.dialog_negativ, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.dialog_negative, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
Toast.makeText(main, R.string.dialog_abort, Toast.makeText(main, R.string.dialog_abort,

View file

@ -3,6 +3,7 @@ package de.vanitasvitae.enigmandroid.layout;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.res.Resources;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
@ -73,7 +74,7 @@ public class PluggableDialogBuilder
adb.setTitle(R.string.title_plugboard_dialog); adb.setTitle(R.string.title_plugboard_dialog);
Dialog d = adb.setView(dialogView) Dialog d = adb.setView(dialogView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
int[] plugs = new int[26]; int[] plugs = new int[26];
for (int i = 0; i < 26; i++) { for (int i = 0; i < 26; i++) {
@ -84,7 +85,7 @@ public class PluggableDialogBuilder
Toast.makeText(main.getApplication(), R.string.dialog_plugboard_set, Toast.LENGTH_SHORT).show(); Toast.makeText(main.getApplication(), R.string.dialog_plugboard_set, Toast.LENGTH_SHORT).show();
} }
}) })
.setNegativeButton(R.string.dialog_negativ, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.dialog_negative, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
Toast.makeText(main, R.string.dialog_abort, Toast.makeText(main, R.string.dialog_abort,
@ -112,7 +113,7 @@ public class PluggableDialogBuilder
adb.setTitle(R.string.title_reflector_dialog); adb.setTitle(R.string.title_reflector_dialog);
Dialog d = adb.setView(dialogView) Dialog d = adb.setView(dialogView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
int[] plugs = new int[26]; int[] plugs = new int[26];
for (int i = 0; i < 26; i++) { for (int i = 0; i < 26; i++) {
@ -123,7 +124,7 @@ public class PluggableDialogBuilder
Toast.makeText(main.getApplication(), R.string.dialog_reflector_set, Toast.LENGTH_SHORT).show(); Toast.makeText(main.getApplication(), R.string.dialog_reflector_set, Toast.LENGTH_SHORT).show();
} }
}) })
.setNegativeButton(R.string.dialog_negativ, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.dialog_negative, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
Toast.makeText(main, R.string.dialog_abort, Toast.makeText(main, R.string.dialog_abort,
@ -374,7 +375,11 @@ public class PluggableDialogBuilder
public void setConnectedButton(int other) public void setConnectedButton(int other)
{ {
this.connectedButton = other; this.connectedButton = other;
this.getButton().setText((char) (index + 65) + ":" + (char) (connectedButton + 65)); Resources res = MainActivity.ActivitySingleton.getInstance().getActivity().getResources();
this.getButton().setText(String.format(
res.getText(R.string.button_plug_title).toString(),
""+(char) (index+65),
""+(char) (connectedButton+65)));
} }
/** /**
@ -391,7 +396,10 @@ public class PluggableDialogBuilder
*/ */
public void setWaiting() public void setWaiting()
{ {
this.getButton().setText((char) (index + 65) + ": "); Resources res = MainActivity.ActivitySingleton.getInstance().getActivity().getResources();
this.getButton().setText(String.format(
res.getText(R.string.button_plug_title).toString(),
""+(char) (index+65)," "));
} }
/** /**

View file

@ -139,26 +139,26 @@ public abstract class RingSettingsDialogBuilder
ring3.setSelection(action.getThirdValueFromBundle()); ring3.setSelection(action.getThirdValueFromBundle());
AlertDialog.Builder builder = new AlertDialog.Builder(main); AlertDialog.Builder builder = new AlertDialog.Builder(main);
builder.setTitle(R.string.title_ringsetting); builder.setTitle(R.string.title_ring_setting);
builder.setView(ringSettingsView) builder.setView(ringSettingsView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener()
{ {
public void onClick(DialogInterface dialog, int id) public void onClick(DialogInterface dialog, int id)
{ {
action.firstSpinnerItemSelected(ring1.getSelectedItemPosition()); action.firstSpinnerItemSelected(ring1.getSelectedItemPosition());
action.secondSpinnerItemSelected(ring2.getSelectedItemPosition()); action.secondSpinnerItemSelected(ring2.getSelectedItemPosition());
action.thirdSpinnerItemSelected(ring3.getSelectedItemPosition()); action.thirdSpinnerItemSelected(ring3.getSelectedItemPosition());
String message = main.getResources().getString( String message = String.format(main.getResources().getString(
R.string.dialog_ringsettings_success) + " " + R.string.dialog_ring_settings_success),
(ring1.getSelectedItemPosition()+1) + ", " + (ring1.getSelectedItemPosition()+1) + ", " +
(ring2.getSelectedItemPosition()+1) + ", " + (ring2.getSelectedItemPosition()+1) + ", " +
(ring3.getSelectedItemPosition()+1) + "."; (ring3.getSelectedItemPosition()+1));
main.onDialogFinished(stateBundle); main.onDialogFinished(stateBundle);
Toast.makeText(main, message, Toast.LENGTH_LONG).show(); Toast.makeText(main, message, Toast.LENGTH_LONG).show();
} }
}) })
.setNegativeButton(R.string.dialog_negativ, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.dialog_negative, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
Toast.makeText(main, R.string.dialog_abort, Toast.makeText(main, R.string.dialog_abort,
@ -266,10 +266,10 @@ public abstract class RingSettingsDialogBuilder
ring4.setSelection(action.getFourthValueFromBundle()); ring4.setSelection(action.getFourthValueFromBundle());
AlertDialog.Builder builder = new AlertDialog.Builder(main); AlertDialog.Builder builder = new AlertDialog.Builder(main);
builder.setTitle(R.string.title_ringsetting); builder.setTitle(R.string.title_ring_setting);
builder.setView(ringSettingsView) builder.setView(ringSettingsView)
.setCancelable(true) .setCancelable(true)
.setPositiveButton(R.string.dialog_positiv, new DialogInterface.OnClickListener() .setPositiveButton(R.string.dialog_positive, new DialogInterface.OnClickListener()
{ {
public void onClick(DialogInterface dialog, int id) public void onClick(DialogInterface dialog, int id)
{ {
@ -277,17 +277,17 @@ public abstract class RingSettingsDialogBuilder
action.secondSpinnerItemSelected(ring2.getSelectedItemPosition()); action.secondSpinnerItemSelected(ring2.getSelectedItemPosition());
action.thirdSpinnerItemSelected(ring3.getSelectedItemPosition()); action.thirdSpinnerItemSelected(ring3.getSelectedItemPosition());
action.fourthSpinnerItemSelected(ring4.getSelectedItemPosition()); action.fourthSpinnerItemSelected(ring4.getSelectedItemPosition());
String message = main.getResources().getString( String message = String.format(main.getResources().getString(
R.string.dialog_ringsettings_success) + " " + R.string.dialog_ring_settings_success),
(ring1.getSelectedItemPosition()+1) + ", " + (ring1.getSelectedItemPosition()+1) + ", " +
(ring2.getSelectedItemPosition()+1) + ", " + (ring2.getSelectedItemPosition()+1) + ", " +
(ring3.getSelectedItemPosition()+1) + ", " + (ring3.getSelectedItemPosition()+1) + ", " +
(ring4.getSelectedItemPosition()+1) + "."; (ring4.getSelectedItemPosition()+1));
main.onDialogFinished(stateBundle); main.onDialogFinished(stateBundle);
Toast.makeText(main, message, Toast.LENGTH_LONG).show(); Toast.makeText(main, message, Toast.LENGTH_LONG).show();
} }
}) })
.setNegativeButton(R.string.dialog_negativ, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.dialog_negative, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
Toast.makeText(main, R.string.dialog_abort, Toast.makeText(main, R.string.dialog_abort,

View file

@ -105,7 +105,8 @@
android:layout_weight="50" android:layout_weight="50"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button_reflector" android:id="@+id/button_reflector"
android:text="@string/hint_enigma_reflector_wiring"/> android:text="@string/hint_enigma_reflector_wiring"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="50" android:layout_weight="50"
@ -114,7 +115,7 @@
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange" android:background="@drawable/button_orange"
/> tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>

View file

@ -159,7 +159,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:text="@string/title_plugboard_dialog" android:text="@string/title_plugboard_dialog"
android:id="@+id/button_plugboard" /> android:id="@+id/button_plugboard"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
@ -169,7 +170,8 @@
android:id="@+id/button_crypt" android:id="@+id/button_crypt"
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange"/> android:background="@drawable/button_orange"
tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>

View file

@ -182,7 +182,8 @@
android:layout_weight="50" android:layout_weight="50"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button_plugboard" android:id="@+id/button_plugboard"
android:text="@string/title_plugboard_dialog"/> android:text="@string/title_plugboard_dialog"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="50" android:layout_weight="50"
@ -190,7 +191,8 @@
android:id="@+id/button_crypt" android:id="@+id/button_crypt"
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange"/> android:background="@drawable/button_orange"
tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>

View file

@ -19,7 +19,7 @@
android:id="@+id/Q" android:id="@+id/Q"
android:text="Q: " android:text="Q: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -27,7 +27,7 @@
android:id="@+id/W" android:id="@+id/W"
android:text="W: " android:text="W: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -35,7 +35,7 @@
android:id="@+id/E" android:id="@+id/E"
android:text="E: " android:text="E: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -43,7 +43,7 @@
android:id="@+id/R" android:id="@+id/R"
android:text="R: " android:text="R: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -51,7 +51,7 @@
android:id="@+id/T" android:id="@+id/T"
android:text="T: " android:text="T: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -59,7 +59,7 @@
android:id="@+id/Z" android:id="@+id/Z"
android:text="Z: " android:text="Z: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -67,7 +67,7 @@
android:id="@+id/U" android:id="@+id/U"
android:text="U: " android:text="U: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -75,7 +75,7 @@
android:id="@+id/I" android:id="@+id/I"
android:text="I: " android:text="I: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -83,7 +83,7 @@
android:id="@+id/O" android:id="@+id/O"
android:text="O: " android:text="O: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout> </LinearLayout>
@ -94,7 +94,7 @@
android:layout_below="@id/first_row" android:layout_below="@id/first_row"
android:id="@+id/second_row"> android:id="@+id/second_row">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -162,7 +162,7 @@
android:text="K: " android:text="K: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -183,7 +183,7 @@
android:id="@+id/P" android:id="@+id/P"
android:text="P: " android:text="P: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -191,7 +191,7 @@
android:id="@+id/Y" android:id="@+id/Y"
android:text="Y: " android:text="Y: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -199,7 +199,7 @@
android:id="@+id/X" android:id="@+id/X"
android:text="X: " android:text="X: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -207,7 +207,7 @@
android:id="@+id/C" android:id="@+id/C"
android:text="C: " android:text="C: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -215,7 +215,7 @@
android:id="@+id/V" android:id="@+id/V"
android:text="V: " android:text="V: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -223,7 +223,7 @@
android:id="@+id/B" android:id="@+id/B"
android:text="B: " android:text="B: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -231,7 +231,7 @@
android:id="@+id/N" android:id="@+id/N"
android:text="N: " android:text="N: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -239,7 +239,7 @@
android:id="@+id/M" android:id="@+id/M"
android:text="M: " android:text="M: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -247,7 +247,7 @@
android:id="@+id/L" android:id="@+id/L"
android:text="L: " android:text="L: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout> </LinearLayout>

View file

@ -0,0 +1,88 @@
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingStart="5dp"
android:paddingEnd="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/ringstellung_layout_hint">
<!-- About Enigma. -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/title_about_dialog"
android:id="@+id/title_section_app_description_text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small"
android:text="@string/description_text"
android:id="@+id/about_app_description"/>
<!-- About Version -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"
android:text="@string/action_version"
android:id="@+id/title_section_version"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small"
android:id="@+id/about_version_section"/>
<!-- About How To -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"
android:text="@string/title_section_how_to_use"
android:id="@+id/title_section_how_to_use"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small"
android:text="@string/section_how_to_use"
android:id="@+id/section_how_to_use"/>
<!-- About Developer -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"
android:text="@string/title_section_developer"
android:id="@+id/title_section_developer_text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small"
android:text="@string/section_developer"
android:id="@+id/about_developer_section"/>
<!-- About Disclaimer -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"
android:text="@string/title_section_disclaimer"
android:id="@+id/title_section_disclaimer_text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small"
android:text="@string/section_disclaimer"
android:id="@+id/about_disclaimer_section"/>
</LinearLayout>
</ScrollView>

View file

@ -106,7 +106,8 @@
android:layout_weight="50" android:layout_weight="50"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button_reflector" android:id="@+id/button_reflector"
android:text="@string/hint_enigma_reflector_wiring"/> android:text="@string/hint_enigma_reflector_wiring"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="50" android:layout_weight="50"
@ -115,7 +116,7 @@
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange" android:background="@drawable/button_orange"
/> tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -78,7 +78,7 @@
android:layout_below="@+id/lin_lay_1" android:layout_below="@+id/lin_lay_1"
android:id="@+id/lin_lay_names_2"> android:id="@+id/lin_lay_names_2">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight=".125" android:layout_weight=".125"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -99,7 +99,7 @@
android:layout_weight=".25" android:layout_weight=".25"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/hint_rotor1_position"/> android:text="@string/hint_rotor1_position"/>
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight=".125" android:layout_weight=".125"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -112,7 +112,7 @@
android:id="@+id/lin_lay_2" android:id="@+id/lin_lay_2"
android:layout_below="@+id/lin_lay_names_2"> android:layout_below="@+id/lin_lay_names_2">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight=".125" android:layout_weight=".125"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -134,7 +134,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/rotor1position"> android:id="@+id/rotor1position">
</Spinner> </Spinner>
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight=".125" android:layout_weight=".125"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -174,7 +174,8 @@
android:layout_weight="50" android:layout_weight="50"
android:text="@string/title_plugboard_dialog" android:text="@string/title_plugboard_dialog"
android:id="@+id/button_plugboard" android:id="@+id/button_plugboard"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="50" android:layout_weight="50"
@ -183,7 +184,7 @@
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange" android:background="@drawable/button_orange"
/> tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -180,7 +180,8 @@
android:layout_weight="50" android:layout_weight="50"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button_plugboard" android:id="@+id/button_plugboard"
android:text="@string/title_plugboard_dialog"/> android:text="@string/title_plugboard_dialog"
tools:ignore="ButtonStyle"/>
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="50" android:layout_weight="50"
@ -189,7 +190,7 @@
android:onClick="doCrypto" android:onClick="doCrypto"
android:text="@string/button_crypt" android:text="@string/button_crypt"
android:background="@drawable/button_orange" android:background="@drawable/button_orange"
/> tools:ignore="ButtonStyle"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -1,13 +1,9 @@
<RelativeLayout <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="fill_parent"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="5dp"> android:paddingEnd="5dp">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -18,14 +14,14 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/title_about_dialog" android:text="@string/title_about_dialog"
android:id="@+id/title_section_app_description_text"/> android:id="@+id/title_section_app_description_text"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small" android:textAppearance="@android:style/TextAppearance.Small"
android:text="@string/description_text" android:text="@string/description_text"
android:id="@+id/about_app_description"/> android:id="@+id/about_app_description"/>
@ -33,28 +29,28 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/action_version" android:text="@string/action_version"
android:id="@+id/title_section_version"/> android:id="@+id/title_section_version"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small" android:textAppearance="@android:style/TextAppearance.Small"
android:id="@+id/about_version_section"/> android:id="@+id/about_version_section"/>
<!-- About How To --> <!-- About How To -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/title_section_how_to_use" android:text="@string/title_section_how_to_use"
android:id="@+id/title_section_how_to_use"/> android:id="@+id/title_section_how_to_use"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small" android:textAppearance="@android:style/TextAppearance.Small"
android:text="@string/section_how_to_use" android:text="@string/section_how_to_use"
android:id="@+id/section_how_to_use"/> android:id="@+id/section_how_to_use"/>
@ -62,14 +58,14 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/title_section_developer" android:text="@string/title_section_developer"
android:id="@+id/title_section_developer_text"/> android:id="@+id/title_section_developer_text"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small" android:textAppearance="@android:style/TextAppearance.Small"
android:text="@string/section_developer" android:text="@string/section_developer"
android:id="@+id/about_developer_section"/> android:id="@+id/about_developer_section"/>
@ -77,18 +73,16 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
android:text="@string/title_section_disclaimer" android:text="@string/title_section_disclaimer"
android:id="@+id/title_section_disclaimer_text"/> android:id="@+id/title_section_disclaimer_text"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Holo.Small" android:textAppearance="@android:style/TextAppearance.Small"
android:text="@string/section_disclaimer" android:text="@string/section_disclaimer"
android:id="@+id/about_disclaimer_section"/> android:id="@+id/about_disclaimer_section"/>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</RelativeLayout>

View file

@ -19,7 +19,7 @@
android:id="@+id/Q" android:id="@+id/Q"
android:text="Q: " android:text="Q: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -27,7 +27,7 @@
android:id="@+id/W" android:id="@+id/W"
android:text="W: " android:text="W: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -35,7 +35,7 @@
android:id="@+id/E" android:id="@+id/E"
android:text="E: " android:text="E: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -43,7 +43,7 @@
android:id="@+id/R" android:id="@+id/R"
android:text="R: " android:text="R: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -51,7 +51,7 @@
android:id="@+id/T" android:id="@+id/T"
android:text="T: " android:text="T: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -61,7 +61,7 @@
android:layout_below="@id/first_row" android:layout_below="@id/first_row"
android:id="@+id/second_row"> android:id="@+id/second_row">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -97,7 +97,7 @@
android:text="O: " android:text="O: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -118,7 +118,7 @@
android:id="@+id/A" android:id="@+id/A"
android:text="A: " android:text="A: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -126,7 +126,7 @@
android:id="@+id/S" android:id="@+id/S"
android:text="S: " android:text="S: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -134,7 +134,7 @@
android:id="@+id/D" android:id="@+id/D"
android:text="D: " android:text="D: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -142,7 +142,7 @@
android:id="@+id/F" android:id="@+id/F"
android:text="F: " android:text="F: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -150,7 +150,7 @@
android:id="@+id/G" android:id="@+id/G"
android:text="G: " android:text="G: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout> </LinearLayout>
@ -161,7 +161,7 @@
android:layout_below="@id/third_row" android:layout_below="@id/third_row"
android:id="@+id/fourth_row"> android:id="@+id/fourth_row">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -197,7 +197,7 @@
android:text="P: " android:text="P: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -218,7 +218,7 @@
android:id="@+id/Y" android:id="@+id/Y"
android:text="Y: " android:text="Y: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -226,7 +226,7 @@
android:id="@+id/X" android:id="@+id/X"
android:text="X: " android:text="X: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -234,7 +234,7 @@
android:id="@+id/C" android:id="@+id/C"
android:text="C: " android:text="C: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -242,7 +242,7 @@
android:id="@+id/V" android:id="@+id/V"
android:text="V: " android:text="V: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
<Button <Button
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -250,7 +250,7 @@
android:id="@+id/B" android:id="@+id/B"
android:text="B: " android:text="B: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout> </LinearLayout>
@ -261,7 +261,7 @@
android:layout_below="@id/fifth_row" android:layout_below="@id/fifth_row"
android:id="@+id/sixth_row"> android:id="@+id/sixth_row">
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="2" android:layout_weight="2"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -289,7 +289,7 @@
android:text="L: " android:text="L: "
android:background="@drawable/button_grey" android:background="@drawable/button_grey"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<Space <android.support.v4.widget.Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="2" android:layout_weight="2"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

View file

@ -15,7 +15,7 @@
android:icon="@drawable/ic_send_white_48dp"/> android:icon="@drawable/ic_send_white_48dp"/>
<!-- RINGSETTING --> <!-- RINGSETTING -->
<item android:id="@+id/action_choose_ringsetting" <item android:id="@+id/action_choose_ringsetting"
android:title="@string/action_choose_ringsettings" android:title="@string/action_choose_ring_settings"
android:orderInCategory="97" android:orderInCategory="97"
android:showAsAction="ifRoom" /> android:showAsAction="ifRoom" />
<!-- ENTER SEED --> <!-- ENTER SEED -->

View file

@ -24,7 +24,11 @@
jeweiligen Button an und verbinden Sie die gewünschten Steckerpaare, indem Sie im sich öffnenden Dialog nacheinander jeweils zwei jeweiligen Button an und verbinden Sie die gewünschten Steckerpaare, indem Sie im sich öffnenden Dialog nacheinander jeweils zwei
Stecker berühren. Falls sie eine Verbindung trennen möchten, klicken Sie einen der betroffenen Stecker doppelt an. Stecker berühren. Falls sie eine Verbindung trennen möchten, klicken Sie einen der betroffenen Stecker doppelt an.
Optional können Sie außerdem auch noch die Ringstellung definieren. Öffnen Sie dazu das Optionsmenü und wählen Sie den Punkt \"Ringstellung\". Optional können Sie außerdem auch noch die Ringstellung definieren. Öffnen Sie dazu das Optionsmenü und wählen Sie den Punkt \"Ringstellung\".
Haben Sie alle Einstellungen getätigt klicken Sie auf den Button \"Ver-Entschlüsseln\".</string> Haben Sie alle Einstellungen getätigt klicken Sie auf den Button \"Ver-Entschlüsseln\".
Um die gewählte Konfiguration der Enigma Maschine per QR-Code zu teilen, wählen Sie den Eintrag \"Teile Konfiguration per QR-Code\" aus dem Optionsmenü.
Um eine per QR-Code geteilte Konfiguration zu scannen, wählen Sie stattdessen den Eintrag \"Lese Konfiguration aus QR-Code\".
Außerdem können Sie eine Konfiguration aus einem Schlüsselwort generieren, oder wiederherstellen, indem Sie dein Eintrag \"Konfiguration aus Schlüsselwort\"
wählen und im erscheinenden Dialog entweder ein beliebiges Wort oder den Inhalt eines QR-Codes (\"EnigmAndroid/…\" eingeben.</string>
<string name="title_section_developer">Entwickler</string> <string name="title_section_developer">Entwickler</string>
<string name="section_developer">EnigmAndroid wird entwickelt von: \nPaul Schaub</string> <string name="section_developer">EnigmAndroid wird entwickelt von: \nPaul Schaub</string>

View file

@ -9,7 +9,7 @@
<string name="action_send_qr">Teile Konfiguration per QR-Code</string> <string name="action_send_qr">Teile Konfiguration per QR-Code</string>
<string name="action_read_passphrase">Konfiguration aus Schlüsselwort</string> <string name="action_read_passphrase">Konfiguration aus Schlüsselwort</string>
<string name="action_settings">Einstellungen</string> <string name="action_settings">Einstellungen</string>
<string name="action_choose_ringsettings">Ringstellung</string> <string name="action_choose_ring_settings">Ringstellung</string>
<string name="action_send">Senden</string> <string name="action_send">Senden</string>
<string name="send_to">Senden an…</string> <string name="send_to">Senden an…</string>
<string name="hint_enigma_type_here">Hier Tippen</string> <string name="hint_enigma_type_here">Hier Tippen</string>
@ -29,17 +29,18 @@
<string name="button_crypt">Ver-/Entschlüsseln</string> <string name="button_crypt">Ver-/Entschlüsseln</string>
<string name="error_no_text_to_send">Nachricht ist leer.</string> <string name="error_no_text_to_send">Nachricht ist leer.</string>
<string name="error_no_valid_qr">Fehler: Kein korrekter EnigmAndroid QR-Code!</string> <string name="error_no_valid_qr">Fehler: Kein korrekter EnigmAndroid QR-Code!</string>
<string name="title_ringsetting">Ringstellungen</string> <string name="title_ring_setting">Ringstellungen</string>
<string name="title_plugboard_dialog">Steckbrett-\nVerbindungen</string> <string name="title_plugboard_dialog">Steckbrett-\nVerbindungen</string>
<string name="title_reflector_dialog">Verkabelung Umkehrwalze</string> <string name="title_reflector_dialog">Verkabelung Umkehrwalze</string>
<string name="dialog_positiv">OK</string> <string name="dialog_positive">OK</string>
<string name="dialog_negativ">Abbrechen</string> <string name="dialog_negative">Abbrechen</string>
<string name="dialog_ringsettings_success">Setze Ringe auf</string> <string name="dialog_ring_settings_success">Setze Ringe auf %1$s.</string>
<string name="dialog_reflector_set">Umkehrwalze verkabelt.</string> <string name="dialog_reflector_set">Umkehrwalze verkabelt.</string>
<string name="dialog_plugboard_set">Steckbrett gesteckert.</string> <string name="dialog_plugboard_set">Steckbrettverbindungen gesetzt.</string>
<string name="dialog_passphrase_set">Generiere Konfiguration aus Schlüsselwort</string> <string name="dialog_passphrase_set">Konfiguration aus Schlüsselwort %1$s generiert.</string>
<string name="dialog_abort">Keine Änderungen</string> <string name="dialog_passphrase_was_coded_state">Konfiguration aus Kodierung wiederhergestellt.</string>
<string name="message_reset">Enigma zurückgesetzt</string> <string name="dialog_abort">Keine Änderungen.</string>
<string name="message_random">Enigma auf zufällige Konfiguration gesetzt</string> <string name="message_reset">Enigma zurückgesetzt.</string>
<string name="message_random">Enigma auf zufällige Konfiguration gesetzt.</string>
</resources> </resources>

View file

@ -23,8 +23,10 @@
<string name="pref_description_numeric_spelling_language">Sprache in der Zahlen buchstabiert werden sollen.</string> <string name="pref_description_numeric_spelling_language">Sprache in der Zahlen buchstabiert werden sollen.</string>
<string-array name="pref_list_numeric_spelling_language"> <string-array name="pref_list_numeric_spelling_language">
<item>Deutsch</item> <item>Deutsch</item>
<item>Französisch</item>
<item>Englisch</item> <item>Englisch</item>
<item>Französisch</item>
<item>Spanisch</item>
<item>Italienisch</item>
<item>Keine Ersetzung</item> <item>Keine Ersetzung</item>
</string-array> </string-array>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:Theme.Holo">
<!-- Customize your theme here. -->
</style>
</resources>

View file

@ -13,14 +13,16 @@
</string> </string>
<string name="title_section_how_to_use">How to use</string> <string name="title_section_how_to_use">How to use</string>
<string name="section_how_to_use">In the beginning, choose a model of the enigma machine to work with. <string name="section_how_to_use">At first, choose a model of the enigma machine to work with.
You can do this in the settings. To encrypt/decrypt a message, you can name it into the input field. You can do this in the settings. To encrypt/decrypt a message, you can name it into the input field.
Afterwards you can - depending on the chosen model - select a reflector and the some rotors. Also select their initial positions. Afterwards you can - depending on the chosen model - select a reflector and the some rotors. Also select their initial positions.
Then you may set pairs on the plugboard or on the pluggable reflector. Then you may set pairs on the plugboard or on the pluggable reflector.
Therefore press the respective button and connect the characters you wish to connect by clicking them one after another. Therefore press the respective button and connect the characters you wish to connect by clicking them one after another.
If you want to disconnect two plugs, just touch one of the plugs twice. If you want to disconnect two plugs, just touch one of the plugs twice.
Also you can optionally set custom ring settings. Open the options menu and select \"Ringsettings\". Also you can optionally set custom ring settings. Open the options menu and select \"Ring-Settings\".
When you are ready press \"En-/Decrypt!\".</string> When you are ready press \"En-/Decrypt!\". To share the configuration of the enigma machine via QR-Code, just open the options
menu and select the entry \"Share configuration via QR-Code\". To scan a QR-Code, choose the respective entry.
Also you can enter a codeword or the content of a QR-Code by clicking on the entry \"Create configuration from passphrase\" to restore a configuration that way.</string>
<string name="title_section_developer">Developer</string> <string name="title_section_developer">Developer</string>
<string name="section_developer">EnigmAndroid is developed by: \nPaul Schaub</string> <string name="section_developer">EnigmAndroid is developed by: \nPaul Schaub</string>

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="version" translatable="false">0.1.8-27.09.2015</string>
<string name="app_name">EnigmAndroid</string> <string name="app_name">EnigmAndroid</string>
<string name="action_version">Version</string> <string name="action_version">Version</string>
<string name="action_reset">Reset</string> <string name="action_reset">Reset</string>
@ -9,7 +7,7 @@
<string name="action_read_qr">Read configuration from QR-Code</string> <string name="action_read_qr">Read configuration from QR-Code</string>
<string name="action_send_qr">Share configuration via QR-Code</string> <string name="action_send_qr">Share configuration via QR-Code</string>
<string name="action_read_passphrase">Create configuration from passphrase</string> <string name="action_read_passphrase">Create configuration from passphrase</string>
<string name="action_choose_ringsettings">Ring-Settings</string> <string name="action_choose_ring_settings">Ring-Settings</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="action_send">Send</string> <string name="action_send">Send</string>
<string name="send_to">Send to…</string> <string name="send_to">Send to…</string>
@ -30,18 +28,21 @@
<string name="button_crypt">En-/Decrypt!</string> <string name="button_crypt">En-/Decrypt!</string>
<string name="error_no_text_to_send">Can\'t send empty text.</string> <string name="error_no_text_to_send">Can\'t send empty text.</string>
<string name="error_no_valid_qr">Error: Not a valid EnigmAndroid QR-Code!</string> <string name="error_no_valid_qr">Error: Not a valid EnigmAndroid QR-Code!</string>
<string name="title_ringsetting">Ring-Settings</string> <string name="title_ring_setting">Ring-Settings</string>
<string name="title_plugboard_dialog">Plugboard Settings</string> <string name="title_plugboard_dialog">Plugboard Settings</string>
<string name="title_reflector_dialog">Reflector Wiring</string> <string name="title_reflector_dialog">Reflector Wiring</string>
<string name="dialog_positiv">OK</string> <string name="dialog_positive">OK</string>
<string name="dialog_negativ">Cancel</string> <string name="dialog_negative">Cancel</string>
<string name="dialog_ringsettings_success">Set Ring-Settings to</string> <string name="dialog_ring_settings_success">Set Ring-Settings to %1$s.</string>
<string name="dialog_reflector_set">Rewired Reflector.</string> <string name="dialog_reflector_set">Rewired Reflector.</string>
<string name="dialog_plugboard_set">Plugged Plugboard.</string> <string name="dialog_plugboard_set">Set Plugboard configuration.</string>
<string name="dialog_passphrase_set">Generate configuration from passphrase</string> <string name="dialog_passphrase_set">Generate configuration from passphrase %1$s.</string>
<string name="dialog_abort">No changes</string> <string name="dialog_passphrase_was_coded_state">Restored configuration from coded state.</string>
<string name="message_reset">Enigma reset</string> <string name="dialog_abort">No changes.</string>
<string name="message_random">Enigma set to random configuration</string> <string name="message_reset">Enigma reset.</string>
<string name="message_random">Enigma set to random configuration.</string>
<string name="button_plug_title">%1$s:%2$s</string>
<string-array translatable="false" name="rotors_1_3"> <string-array translatable="false" name="rotors_1_3">
<item>I</item> <item>I</item>

View file

@ -38,14 +38,18 @@
<string name="pref_description_numeric_spelling_language">Language, in which numbers are spelled.</string> <string name="pref_description_numeric_spelling_language">Language, in which numbers are spelled.</string>
<string-array name="pref_list_numeric_spelling_language"> <string-array name="pref_list_numeric_spelling_language">
<item>German</item> <item>German</item>
<item>French</item>
<item>English</item> <item>English</item>
<item>French</item>
<item>Spanish</item>
<item>Italian</item>
<item>No replacing</item> <item>No replacing</item>
</string-array> </string-array>
<string-array translatable="false" name="pref_alias_numeric_spelling_language"> <string-array translatable="false" name="pref_alias_numeric_spelling_language">
<item>de</item> <item>de</item>
<item>fr</item>
<item>en</item> <item>en</item>
<item>fr</item>
<item>sp</item>
<item>it</item>
<item>no</item> <item>no</item>
</string-array> </string-array>

View file

@ -1,7 +1,7 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo"> <style name="AppTheme" parent="android:Theme.Black">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
</style> </style>