Fix some more setup layouts

This moves the nav buttons to the bottom of the screen, and
improves tablet layouts.

Change-Id: I20642c81b96307e4f45b1b3ad1337d4ff5aafd2e
This commit is contained in:
Martin Hibdon 2014-02-10 15:09:02 -08:00
parent 0c1617f6aa
commit 7b42720199
10 changed files with 55 additions and 25 deletions

View File

@ -16,17 +16,21 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
<ImageButton
android:id="@+id/previous"
android:layout_marginTop="@dimen/setup_buttons_padding_top"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:text="@string/previous_action" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_back"
android:text="@string/previous_action"/>
<ImageButton
android:id="@+id/next"
android:layout_below="@+id/previous"
android:layout_marginTop="@dimen/setup_buttons_vertical_spacing"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:text="@string/next_action" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_forward"
android:text="@string/next_action"/>
</RelativeLayout>

View File

@ -46,21 +46,25 @@
android:background="@color/account_setup_divider_color" />
<!-- Buttons on the right -->
<Button
<ImageButton
android:id="@+id/previous"
android:layout_below="@+id/top_divider"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/setup_buttons_padding_top"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_back"
android:text="@string/previous_action" />
<Button
<ImageButton
android:id="@+id/next"
android:layout_below="@+id/previous"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/setup_buttons_vertical_spacing"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_forward"
android:text="@string/next_action" />
<!-- Fragment on the left containing the setup info -->

View File

@ -46,21 +46,25 @@
android:background="@color/account_setup_divider_color" />
<!-- Buttons on the right -->
<Button
<ImageButton
android:id="@+id/previous"
android:layout_below="@+id/top_divider"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/setup_buttons_padding_top"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_back"
android:text="@string/previous_action" />
<Button
<ImageButton
android:id="@+id/next"
android:layout_below="@+id/previous"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/setup_buttons_vertical_spacing"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_forward"
android:text="@string/next_action" />
<!-- Fragment on the left containing the setup info -->

View File

@ -47,6 +47,10 @@
<!-- Primary fragment -->
<include layout="@layout/account_setup_fragment_container" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
<!-- Buttons below that -->
<include layout="@layout/account_setup_buttons" />

View File

@ -77,19 +77,23 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/setup_buttons_padding_bottom"
>
<Button
<ImageButton
android:id="@+id/previous"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/setup_buttons_padding_left"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_back"
android:text="@string/previous_action" />
<Button
<ImageButton
android:id="@+id/next"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_forward"
android:text="@string/next_action" />
</RelativeLayout>
</LinearLayout>

View File

@ -77,19 +77,23 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/setup_buttons_padding_bottom"
>
<Button
<ImageButton
android:id="@+id/previous"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/setup_buttons_padding_left"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_back"
android:text="@string/previous_action" />
<Button
<ImageButton
android:id="@+id/next"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/setup_buttons_padding_right"
style="@style/accountSetupButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_nav_arrow_forward"
android:text="@string/next_action" />
</RelativeLayout>
</LinearLayout>

View File

@ -37,6 +37,10 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" />
<include layout="@layout/account_setup_fragment_container"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
<include layout="@layout/account_setup_buttons"/>
</LinearLayout>
</ScrollView>

View File

@ -42,7 +42,7 @@
<ImageView
android:id="@+id/add_authentication"
android:contentDescription="@string/clear_authentication_label"
android:contentDescription="@string/add_authentication_label"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"

View File

@ -23,6 +23,7 @@ import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import com.android.email.R;
import com.android.email.activity.UiUtilities;
@ -41,7 +42,7 @@ public class AccountSetupIncoming extends AccountSetupActivity
implements AccountSetupIncomingFragment.Callback, OnClickListener {
/* package */ AccountServerBaseFragment mFragment;
private Button mNextButton;
private ImageButton mNextButton;
/* package */ boolean mNextButtonEnabled;
private boolean mStartedAutoDiscovery;
private EmailServiceInfo mServiceInfo;

View File

@ -26,6 +26,7 @@ import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
/**
* Provides setup flow for SMTP (for IMAP/POP accounts).
@ -37,7 +38,7 @@ public class AccountSetupOutgoing extends AccountSetupActivity
implements AccountSetupOutgoingFragment.Callback, OnClickListener {
/* package */ AccountSetupOutgoingFragment mFragment;
private Button mNextButton;
private ImageButton mNextButton;
/* package */ boolean mNextButtonEnabled;
public static void actionOutgoingSettings(Activity fromActivity, SetupDataFragment setupData) {