Improve layout of lock tutorial, especially improved for sholes.

Now, instead of having equal space overall above and below lock pattern widget,
the lock pattern widget is centered within the space above the button bar
at the bottom.  Also, removing the line below the lock pattern widget per
romain's recommendation; it looks goofy with the button bar below.

see screen shots in http://b/2045023 for the differences.
This commit is contained in:
Karl Rosaen
2009-08-12 16:27:12 -07:00
parent 8ccb9e0d33
commit b732a2848e

View File

@@ -21,39 +21,49 @@
android:layout_height="fill_parent"
android:background="@color/black">
<TextView android:id="@+id/headerText"
<!-- takes up all space above button bar at bottom -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:textSize="18sp"/>
android:layout_weight="1">
<View
android:background="@*android:drawable/code_lock_top"
android:layout_width="fill_parent"
android:layout_height="2dip" />
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<View
android:background="@*android:drawable/code_lock_bottom"
android:layout_width="fill_parent"
android:layout_height="8dip" />
<TextView android:id="@+id/headerText"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:textSize="18sp"/>
<View
android:background="@*android:drawable/code_lock_top"
android:layout_width="fill_parent"
android:layout_height="2dip" />
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- bottom line looks bad when button bar is their too, omit in this case -->
<!--View
android:background="@*android:drawable/code_lock_bottom"
android:layout_width="fill_parent"
android:layout_height="8dip" /-->
<TextView android:id="@+id/footerText"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:textSize="14sp"/>
</LinearLayout>
<!-- message just above the button bar -->
<TextView android:id="@+id/footerText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textSize="14sp"/>
<!-- confirm / restart buttons -->
<LinearLayout style="@android:style/ButtonBar"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- left button: skip, or retry -->
<Button android:id="@+id/footerLeftButton"
android:layout_height="wrap_content"
android:layout_width="140dip"
@@ -61,14 +71,12 @@
android:singleLine="true"
android:text="@string/lockpattern_restart_button_text"/>
<!-- Placeholder to get blank space between the two buttons -->
<View
android:visibility="invisible"
android:layout_height="0dip"
android:layout_width="1dip"
android:layout_weight="1" />
<!-- right button: confirm or ok -->
<Button android:id="@+id/footerRightButton"
android:layout_height="wrap_content"
android:layout_width="140dip"