Update a bunch of layouts

b/14169396
Swap the positions of the headline text and email image
on account setup basics
b/14257403
Swap the positions of the password and "signed in with XXX"
button on the credentials fragment
b/14255447
Adjust padding to fix a number of alignment issues.

Change-Id: I011e259a86123cf205d86407def2ff774744e005
This commit is contained in:
Martin Hibdon 2014-04-22 14:02:18 -07:00
parent 93345dcd83
commit 0dae4d3ffb
16 changed files with 75 additions and 26 deletions

View File

@ -40,6 +40,13 @@
android:layout_marginTop="@dimen/setup_basics_logo_margin_top"
android:layout_marginBottom="@dimen/setup_basics_logo_margin_bottom"
android:layout_gravity="center_horizontal" />
<TextView
android:id="@+id/lower_headline"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/account_setup_basics_headline"
style="@style/account_setup_lower_headline"
android:layout_marginBottom="@dimen/setup_lower_headline_margin_bottom"/>
<TextView
android:id="@+id/instructions"
android:layout_width="wrap_content"
@ -55,10 +62,12 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="16dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/account_setup_basics_email_label"
style="@style/account_setup_label_text" />
<EditText
android:id="@+id/account_email"
android:textAppearance="?android:attr/textAppearanceSmall"
android:contentDescription="@string/account_setup_basics_email_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -47,7 +47,8 @@
android:layout_marginRight="16dip"
android:contentDescription="@string/authentication_label"
android:text="@string/authentication_label"
android:layout_gravity="center_vertical" />
android:layout_gravity="center_vertical"
style="@style/account_setup_label_text"/>
<com.android.email.activity.setup.AuthenticationView
android:id="@+id/authentication_view"
android:layout_width="match_parent"

View File

@ -71,6 +71,7 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1"
style="@style/oauth_label"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" />

View File

@ -40,6 +40,12 @@
android:layout_marginTop="@dimen/setup_basics_logo_margin_top"
android:layout_marginBottom="@dimen/setup_basics_logo_margin_bottom"
android:layout_gravity="center_horizontal" />
<TextView
android:id="@+id/lower_headline"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/account_setup_basics_headline"
style="@style/account_setup_lower_headline"/>
<TextView
android:id="@+id/instructions"
android:layout_width="wrap_content"
@ -51,5 +57,6 @@
android:hint="@string/account_setup_basics_email_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:inputType="textEmailAddress" />
</LinearLayout>

View File

@ -62,12 +62,14 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<Button
android:id="@+id/sign_in_with_oauth"
android:text="@string/sign_in_with_google"
<EditText
android:id="@+id/imap_password"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:hint="@string/password_label"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:inputType="textPassword"
android:imeOptions="actionDone"/>
<TextView
android:id="@+id/or_label"
android:text="@string/or_label"
@ -76,14 +78,12 @@
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/imap_password"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:hint="@string/account_setup_incoming_password_label"
<Button
android:id="@+id/sign_in_with_oauth"
android:text="@string/sign_in_with_google"
android:layout_gravity="center"
android:inputType="textPassword"
android:imeOptions="actionDone"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<include

View File

@ -24,6 +24,7 @@
android:text="@string/authentication_label"
android:layout_height="wrap_content"
android:layout_width="match_parent"
style="@style/account_setup_label_text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
@ -40,6 +41,7 @@
android:layout_weight="1"
android:padding="16dip"
android:drawablePadding="16dip"
style="@style/account_setup_label_text"
android:drawableStart="@drawable/ic_setup_add_authentication"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
@ -53,9 +55,10 @@
<TextView
android:id="@+id/password_label"
android:text="@string/password_label"
android:text="@string/account_setup_incoming_password_label"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@style/account_setup_label_text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_gravity="center_vertical"
android:textColor="?android:attr/textColorPrimary" />
@ -90,13 +93,15 @@
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:paddingTop="8dp"
style="@style/oauth_label"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" />
<ImageView
android:id="@+id/clear_oauth"
android:contentDescription="@string/clear_authentication_label"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:clickable="true"
android:src="@drawable/ic_setup_delete" />

View File

@ -20,7 +20,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dip"
android:gravity="center_vertical" >
<Button
@ -36,7 +35,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:textStyle="bold"
android:text="@string/account_setup_exchange_certificate_title" />
<TextView

View File

@ -19,7 +19,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:text="@string/account_setup_incoming_password_label"
android:layout_height="wrap_content"
@ -30,7 +30,7 @@
android:id="@+id/account_password"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:hint="@string/account_setup_incoming_password_label"
android:hint="@string/password_label"
android:inputType="textPassword"
android:imeOptions="actionNext" />

View File

@ -26,6 +26,7 @@
<!-- Client certificate title, see also styles.xml -->
<style name="client_certificate_title">
<item name="android:layout_alignParentStart">true</item>
<item name="android:paddingTop">@dimen/setup_label_text_padding_top</item>
<item name="android:layout_toStartOf">@+id/select_button</item>
</style>
@ -35,4 +36,9 @@
<item name="android:layout_toStartOf">@id/select_button</item>
</style>
<style name="oauth_label">
<item name="android:paddingRight">10dp</item>
</style>
</resources>

View File

@ -36,6 +36,8 @@
<dimen name="setup_headline_padding_top">24dp</dimen>
<dimen name="setup_headline_padding_side">64dp</dimen>
<dimen name="setup_lower_headline_margin_bottom">10dp</dimen>
<!-- Account setup checkboxes padding -->
<dimen name="setup_checkbox_padding_side">8dp</dimen>
<dimen name="setup_checkbox_padding_top">16dp</dimen>
@ -43,7 +45,7 @@
<!-- Account setup basics -->
<dimen name="setup_basics_logo_margin_top">28dp</dimen>
<dimen name="setup_basics_logo_margin_bottom">56dp</dimen>
<dimen name="setup_basics_logo_margin_bottom">16dp</dimen>
<!-- Account setup row labels -->
<dimen name="setup_label_text_padding_top">0dp</dimen>

View File

@ -42,7 +42,7 @@
<color name="button_text_color">#777777</color>
<color name="button_text_disabled_color">#cccccc</color>
<color name="password_warning_color">#FFA500</color>
<color name="password_warning_color">#d30000</color>
<color name="email_confirmation_color">#808080</color>
<color name="quick_response_text_color">#000000</color>

View File

@ -61,6 +61,8 @@
<dimen name="setup_headline_padding_top">24dp</dimen>
<dimen name="setup_headline_padding_side">24dp</dimen>
<dimen name="setup_lower_headline_margin_bottom">16dp</dimen>
<!-- Info text in any account setup screen -->
<dimen name="setup_info_text_margin_bottom">20dp</dimen>
@ -80,7 +82,9 @@
<dimen name="setup_basics_logo_margin_bottom">4dp</dimen>
<!-- Account setup row labels -->
<dimen name="setup_label_text_padding_top">16dp</dimen>
<dimen name="setup_label_text_padding_top">24dp</dimen>
<dimen name="setup_input_text_padding_bottom">8dp</dimen>
<!-- TODO: probably delete these -->
<!-- Notification dialog -->

View File

@ -30,6 +30,16 @@
<item name="android:paddingRight">@dimen/setup_headline_padding_side</item>
</style>
<style name="account_setup_lower_headline">
<item name="android:fontFamily">sans-serif-thin</item>
<item name="android:textSize">@dimen/setup_headline_text_size</item>
<item name="android:textColor">@color/account_setup_headline_color</item>
</style>
<style name="oauth_label">
<item name="android:paddingLeft">10dp</item>
</style>
<style name="account_setup_fragment_container">
<item name="android:paddingTop">@dimen/setup_fragment_padding_top</item>
<item name="android:paddingLeft">@dimen/setup_fragment_padding_side</item>
@ -53,7 +63,7 @@
<!-- Cancel/Done buttons on the account settings (server settings) fragments -->
<style name="account_settings_button">
<item name="android:layout_width">@dimen/setup_text_button_width</item>
<item name="android:layout_height">40sp</item>
<item name="android:layout_height">48sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">@dimen/setup_text_button_text_size</item>
</style>
@ -97,6 +107,7 @@
<!-- Client certificate title, see also styles-ldrtl.xml -->
<style name="client_certificate_title">
<item name="android:layout_alignParentLeft">true</item>
<item name="android:paddingTop">@dimen/setup_label_text_padding_top</item>
<item name="android:layout_toLeftOf">@id/select_button</item>
</style>

View File

@ -47,7 +47,7 @@ public class AccountSetupBasicsFragment extends AccountSetupFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = inflateTemplatedView(inflater, container,
R.layout.account_setup_basics_fragment, R.string.account_setup_basics_headline);
R.layout.account_setup_basics_fragment, -1);
mEmailView = UiUtilities.getView(view, R.id.account_email);
mManualSetupView = UiUtilities.getView(view, R.id.manual_setup);

View File

@ -81,7 +81,12 @@ public class AccountSetupFragment extends Fragment implements View.OnClickListen
final View template = inflater.inflate(R.layout.account_setup_template, container, false);
TextView headlineView = UiUtilities.getView(template, R.id.headline);
headlineView.setText(headline);
if (headline > 0) {
headlineView.setText(headline);
headlineView.setVisibility(View.VISIBLE);
} else {
headlineView.setVisibility(View.GONE);
}
final ViewGroup contentContainer =
(ViewGroup) template.findViewById(R.id.setup_fragment_content);

View File

@ -205,7 +205,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
// We're using a POP or Exchange account, which does not offer oAuth.
if (mAuthenticationHeader != null) {
mAuthenticationHeader.setVisibility(View.VISIBLE);
mAuthenticationHeader.setText(R.string.password_label);
mAuthenticationHeader.setText(R.string.account_setup_incoming_password_label);
}
mOAuthWrapper.setVisibility(View.GONE);
mPasswordWrapper.setVisibility(View.VISIBLE);