mirror of
https://github.com/vanitasvitae/EnigmAndroid.git
synced 2025-09-10 18:59:40 +02:00
Fixed layout issues
This commit is contained in:
parent
8cf9eda715
commit
7001ea0565
15 changed files with 46 additions and 146 deletions
|
@ -7,7 +7,7 @@
|
|||
android:fullBackupContent="false"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name" >
|
||||
|
|
|
@ -139,10 +139,13 @@ public abstract class LayoutContainer
|
|||
void prepareSpinnerAdapter(Spinner view, int resourceID) {
|
||||
MainActivity main = (MainActivity) MainActivity.ActivitySingleton.getInstance().getActivity();
|
||||
|
||||
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(main, resourceID,
|
||||
android.R.layout.simple_spinner_item);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
view.setAdapter(adapter);
|
||||
ArrayAdapter<CharSequence> ad = new ArrayAdapter<CharSequence>(main,
|
||||
android.R.layout.simple_spinner_item,
|
||||
main.getResources().getTextArray(resourceID));
|
||||
|
||||
ad.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
ad.setDropDownViewTheme(main.getTheme());
|
||||
view.setAdapter(ad);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -153,10 +156,11 @@ public abstract class LayoutContainer
|
|||
void prepareSpinnerAdapter(Spinner view, Character[] array)
|
||||
{
|
||||
MainActivity main = (MainActivity) MainActivity.ActivitySingleton.getInstance().getActivity();
|
||||
ArrayAdapter<Character> adapter = new ArrayAdapter<>(main.getApplicationContext(),
|
||||
ArrayAdapter<Character> adapter = new ArrayAdapter<>(main,
|
||||
android.R.layout.simple_spinner_item, array);
|
||||
adapter.setDropDownViewResource(
|
||||
android.R.layout.simple_spinner_dropdown_item);
|
||||
adapter.setDropDownViewTheme(main.getTheme());
|
||||
view.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
|
|
@ -103,14 +103,15 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_reflector"
|
||||
android:text="@string/hint_enigma_reflector_wiring"
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
android:layout_alignParentBottom="true">
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -156,16 +156,17 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:text="@string/title_plugboard_dialog"
|
||||
android:background="@drawable/button_grey"
|
||||
android:id="@+id/button_plugboard"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
|
|
|
@ -180,14 +180,15 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_plugboard"
|
||||
android:text="@string/title_plugboard_dialog"
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -104,14 +104,15 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_reflector"
|
||||
android:text="@string/hint_enigma_reflector_wiring"
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -174,12 +174,13 @@
|
|||
android:layout_weight="50"
|
||||
android:text="@string/title_plugboard_dialog"
|
||||
android:id="@+id/button_plugboard"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -152,14 +152,15 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_reflector"
|
||||
android:text="@string/hint_enigma_reflector_wiring"
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -178,14 +178,16 @@
|
|||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_plugboard"
|
||||
android:text="@string/title_plugboard_dialog"
|
||||
tools:ignore="ButtonStyle"/>
|
||||
android:background="@drawable/button_grey"
|
||||
tools:ignore="ButtonStyle"
|
||||
/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="50"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/button_crypt"
|
||||
android:onClick="doCrypto"
|
||||
android:text="@string/button_crypt"
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Black">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="@android:style/Theme.Holo"/>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue