EnigmAndroid/app/src/main/res/layout-land/activity_main_i_m3.xml
vanitasvitae 6ac769df94
Started new Iteration of MainActivity as Main2, moved getters and setters of preferences to SettingsActivity
Added Enigma KD, Added protocol version to ensure compatibility with upcoming releases, Added options to share configuration as string, organized sharing/receiving of configuration, moved preference-management to SettingsActivity, Added whats-New-Dialog that informs user about latest changes

Translated some strings, commented some methods in MainActivity

New Icon!

Added comment and removed unused import, peanuts if you ask me

Added Script to automatically render icon in all dimensions

Reformated code and moved Plugboard, EntryWheel, Reflector, Rotor to new package parts

Cleaned repository

Merge branch 'development'
2017-05-05 16:49:30 +02:00

178 lines
5.6 KiB
XML

<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">
<!-- Hints of the spinners-->
<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"
android:text="@string/hint_reflector"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor3"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor2"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor1"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor3_position"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor2_position"/>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hint_rotor1_position"/>
</LinearLayout>
<!-- Spinners -->
<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"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/reflector">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor3">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor2">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor1">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor3position">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor2position">
</Spinner>
<Spinner
android:layout_width="0dp"
android:layout_weight=".14"
android:layout_height="wrap_content"
android:id="@+id/rotor1position">
</Spinner>
</LinearLayout>
<!-- Textboxes for input and output -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin_lay_1"
android:layout_above="@id/buttons_lay"
android:id="@+id/text_layer">
<EditText
android:layout_width="0dp"
android:layout_weight=".50"
android:layout_height="match_parent"
android:id="@+id/input"
android:hint="@string/hint_enigma_type_here" />
<EditText
android:layout_width="0dp"
android:layout_weight=".50"
android:layout_height="match_parent"
android:inputType="none"
android:textIsSelectable="true"
android:id="@+id/output"
android:hint="@string/hint_enigma_code"/>
</LinearLayout>
<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:layout_gravity="bottom"
android:text="@string/title_plugboard_dialog"
android:id="@+id/button_plugboard"
tools:ignore="ButtonStyle"/>
<Button
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:id="@+id/button_crypt"
android:onClick="doCrypto"
android:text="@string/button_crypt"
android:background="@drawable/button_orange"
tools:ignore="ButtonStyle"/>
</LinearLayout>
</RelativeLayout>