Clean up password unlock layout

Remove unnecessary and redundant nested layouts, fix the alignment of
the unlock button to the right edge of the screen, use cleaner margins
and replace the deprecated fill_parent sizes with match_parent.
pull/1/head
Veeti Paananen 12 years ago
parent afa20058b8
commit 89ae5ed4ed

@ -1,57 +1,43 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:fillViewport="true" android:fillViewport="true"
android:background="@drawable/background_pattern_repeat"> android:background="@drawable/background_pattern_repeat">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >
<LinearLayout android:id="@+id/prompt_layout" <LinearLayout android:id="@+id/prompt_layout"
android:paddingRight="16dip" android:padding="16dp"
android:paddingLeft="16dip" android:layout_width="match_parent"
android:paddingTop="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"> android:orientation="vertical">
<ImageView android:layout_width="wrap_content" <ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="30dip" android:layout_marginBottom="24dp"
android:src="@drawable/padlock_prompt"/> android:src="@drawable/padlock_prompt"/>
<TextView style="@style/Registration.Label" <TextView style="@style/Registration.Label"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:textAllCaps="true" android:textAllCaps="true"
android:text="@string/prompt_passphrase_activity__textsecure_passphrase" /> android:text="@string/prompt_passphrase_activity__textsecure_passphrase" />
<EditText android:id="@+id/passphrase_edit" <EditText android:id="@+id/passphrase_edit"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textPassword" android:inputType="textPassword"
android:layout_marginBottom="10dip" android:layout_marginBottom="8dp"
android:singleLine="true"/> android:singleLine="true"/>
<LinearLayout android:orientation="horizontal"
android:gravity="right"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:layout_marginRight="20dip">
<Button android:id="@+id/ok_button" <Button android:id="@+id/ok_button"
android:text="@string/prompt_passphrase_activity__unlock" android:text="@string/prompt_passphrase_activity__unlock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium"/> android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout> </LinearLayout>
</LinearLayout>
</FrameLayout>
</ScrollView> </ScrollView>
Loading…
Cancel
Save