2015-02-05 19:42:38 +01:00
|
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
|
|
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
|
|
android:paddingTop="@dimen/activity_vertical_margin"
|
|
|
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
|
|
tools:context=".MainActivity">
|
|
|
|
|
2015-03-14 00:29:43 +01:00
|
|
|
<!-- Hints of the spinners-->
|
2015-02-05 19:42:38 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:id="@+id/lin_lay_names_1">
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_reflector"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
2015-08-27 01:48:33 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/hint_thin_rotor"/>
|
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor3"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor2"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor1"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
2015-08-27 01:48:33 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/hint_thin_rotor_position"/>
|
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor3_position"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor2_position"/>
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:text="@string/hint_rotor1_position"/>
|
2015-03-14 00:29:43 +01:00
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
</LinearLayout>
|
|
|
|
|
2015-03-14 00:29:43 +01:00
|
|
|
<!-- Spinners -->
|
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:id="@+id/lin_lay_1"
|
|
|
|
android:layout_below="@+id/lin_lay_names_1">
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/reflector">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/thin_rotor"/>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor3">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor2">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor1">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/thin_rotor_position">
|
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor3position">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor2position">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="0dp"
|
2015-08-27 01:48:33 +02:00
|
|
|
android:layout_weight="1"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:id="@+id/rotor1position">
|
2015-02-05 19:42:38 +01:00
|
|
|
</Spinner>
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
2015-03-14 00:29:43 +01:00
|
|
|
<!-- Textboxes for input and output -->
|
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2015-09-15 02:06:47 +02:00
|
|
|
android:layout_below="@+id/lin_lay_1"
|
|
|
|
android:layout_above="@id/buttons_lay"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:id="@+id/text_layer">
|
2015-03-14 00:29:43 +01:00
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
<EditText
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight=".50"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:id="@+id/input"
|
2015-02-18 21:51:40 +01:00
|
|
|
android:hint="@string/hint_enigma_type_here" />
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
<EditText
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight=".50"
|
|
|
|
android:layout_height="match_parent"
|
2015-03-14 00:29:43 +01:00
|
|
|
android:inputType="none"
|
2015-02-05 19:42:38 +01:00
|
|
|
android:textIsSelectable="true"
|
|
|
|
android:id="@+id/output"
|
|
|
|
android:hint="@string/hint_enigma_code"/>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2015-09-15 02:06:47 +02:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/buttons_lay"
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="50"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/button_plugboard"
|
2015-10-09 00:57:54 +02:00
|
|
|
android:text="@string/title_plugboard_dialog"
|
|
|
|
tools:ignore="ButtonStyle"/>
|
2015-09-15 02:06:47 +02:00
|
|
|
<Button
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_weight="50"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/button_crypt"
|
|
|
|
android:onClick="doCrypto"
|
|
|
|
android:text="@string/button_crypt"
|
2015-10-09 00:57:54 +02:00
|
|
|
android:background="@drawable/button_orange"
|
|
|
|
tools:ignore="ButtonStyle"/>
|
2015-09-15 02:06:47 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
2015-02-05 19:42:38 +01:00
|
|
|
|
|
|
|
</RelativeLayout>
|