Remove table layout, use hint text for edit fields

This commit is contained in:
Dominik Schürmann 2014-09-07 17:27:25 +02:00
parent 1f477c8059
commit c026dac8fc
2 changed files with 66 additions and 84 deletions

View File

@ -6,52 +6,48 @@
android:paddingRight="16dp"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal"
android:id="@+id/input">
<TextView
android:id="@+id/passphrase_label_passphrase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="4dp"
android:text="@string/label_passphrase" />
<EditText
android:id="@+id/passphrase_passphrase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:padding="4dp" />
android:hint="@string/label_passphrase"
android:ems="10"
android:layout_gravity="center_horizontal" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="horizontal"
android:id="@+id/progress"
android:visibility="gone">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
style="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:padding="4dp"
android:text="@string/label_unlock"
/>
android:layout_gravity="center_vertical" />
<ProgressBar
style="?android:attr/progressBarStyleSmall"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
</LinearLayout>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:stretchColumns="1">
android:paddingRight="16dp">
<CheckBox
android:id="@+id/passphrase_no_passphrase"
@ -12,41 +12,27 @@
android:layout_height="wrap_content"
android:text="@string/label_no_passphrase" />
<TableRow android:layout_marginBottom="5dip">
<TextView
android:id="@+id/passphrase_label_passphrase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="4dp"
android:text="@string/label_passphrase" />
<EditText
android:id="@+id/passphrase_passphrase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:padding="4dp" />
</TableRow>
<TableRow android:layout_marginBottom="10dip">
<TextView
android:id="@+id/passphrase_label_passphrase_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="4dp"
android:text="@string/label_passphrase_again" />
android:hint="@string/label_passphrase"
android:ems="10"
android:layout_gravity="center_horizontal" />
<EditText
android:id="@+id/passphrase_passphrase_again"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:padding="4dp" />
</TableRow>
android:hint="@string/label_passphrase_again"
android:ems="10"
android:layout_gravity="center_horizontal" />
</TableLayout>
</LinearLayout>