Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fb6275a authored by Jeff Hamilton's avatar Jeff Hamilton
Browse files

Updates to the edit contact UI.

- Updated account colors and color layout
- Updated display in read-only mode
- Clearer strings to identify accounts
- Sort the contacts to edit so read-only ones
  always are at the bottom.

Fixes 2163539 and a good portion of 2163519.

Change-Id: Ib2afc992a8623f2a253d2a52a0b5c50ee866e5d8
parent 0d37e1bb
Loading
Loading
Loading
Loading
+41 −20
Original line number Diff line number Diff line
@@ -25,15 +25,16 @@
    <!-- Left side color bar -->
    <ImageView
        android:id="@+id/color_bar"
        android:layout_width="15dip"
        android:layout_width="5dip"
        android:layout_height="fill_parent"
    />

    <!-- The content -->
    <RelativeLayout
    <LinearLayout
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical"
    >

        <!-- Account info header -->
@@ -42,12 +43,19 @@
            android:layout_width="fill_parent"
        >

            <ImageView android:id="@+id/header_color_bar"
                android:layout_width="fill_parent"
                android:layout_height="2dip"
                android:layout_marginBottom="5dip"
            />

            <ImageView android:id="@+id/header_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="7dip"
                android:layout_marginRight="7dip"
                android:layout_centerVertical="true"
                android:layout_below="@id/header_color_bar"
            />

            <TextView android:id="@+id/header_account_type"
@@ -57,8 +65,7 @@
                android:layout_alignTop="@id/header_icon"
                android:layout_marginTop="-4dip"

                android:textSize="24pt"
                android:textStyle="bold"
                android:textSize="24sp"
                android:textColor="?android:attr/textColorPrimary"
            />

@@ -73,14 +80,20 @@
                android:textColor="?android:attr/textColorPrimary"
            />

            <View
                android:layout_width="fill_parent"
                android:layout_height="1px"
                android:layout_alignParentBottom="true"

                android:background="?android:attr/listDivider"
            />

        </RelativeLayout>

        <FrameLayout
            android:id="@+id/stub_photo"
            android:layout_width="100dip"
            android:layout_height="96dip"
            android:layout_below="@id/header"
            android:layout_alignWithParentIfMissing="true"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="12dip"
            android:paddingTop="10dip">

@@ -97,28 +110,34 @@
            android:layout_below="@id/stub_photo"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="4dip"
            android:layout_alignWithParentIfMissing="true"
            layout="@layout/item_generic_editor" />

        <TextView android:id="@+id/read_only_name"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="6dip"
            android:layout_marginLeft="10dip"

            android:textAppearance="?android:attr/textAppearanceLarge"
        />

        <LinearLayout
            android:id="@+id/sect_general"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/edit_name"
            android:orientation="vertical"
        />

        <View android:id="@+id/head_secondary_divider"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/sect_general"
            android:background="?android:attr/listDivider" />

        <TextView
            android:id="@+id/head_secondary"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/head_secondary_divider"

            android:gravity="center_vertical"
            android:minHeight="?android:attr/listPreferredItemHeight"
@@ -136,20 +155,22 @@
            android:id="@+id/sect_secondary"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/head_secondary"
            android:orientation="vertical" />

        <TextView
            android:id="@+id/edit_read_only"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/edit_name"
            android:gravity="center_horizontal"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:paddingTop="5dip"
            android:paddingBottom="5dip"
            android:text="@string/edit_read_only"/>
            android:layout_marginTop="10dip"
            android:layout_marginBottom="10dip"
            android:layout_marginLeft="10dip"

    </RelativeLayout>
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorPrimary"
            android:drawableLeft="@android:drawable/ic_dialog_alert"
            android:drawablePadding="10dip"
        />

    </LinearLayout>

</com.android.contacts.ui.widget.ContactEditorView>
+1 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ import java.util.concurrent.Executors;
/**
 * Displays a list of contacts. Usually is embedded into the ContactsActivity.
 */
@SuppressWarnings("deprecation")
public class ContactsListActivity extends ListActivity implements
        View.OnCreateContextMenuListener, View.OnClickListener {

+2 −2
Original line number Diff line number Diff line
@@ -275,11 +275,11 @@ public class ExchangeSource extends FallbackSource {

    @Override
    public int getHeaderColor(Context context) {
        return 0xff876b47;
        return 0xffd5ba96;
    }

    @Override
    public int getSideBarColor(Context context) {
        return 0xffc6ab8c;
        return 0xffb58e59;
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -183,11 +183,11 @@ public class ExternalSource extends FallbackSource {

    @Override
    public int getHeaderColor(Context context) {
        return 0xff7f93bc;
        return 0xff6d86b4;
    }

    @Override
    public int getSideBarColor(Context context) {
        return 0xffbdc7d8;
        return 0xff6d86b4;
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -263,11 +263,11 @@ public class GoogleSource extends FallbackSource {

    @Override
    public int getHeaderColor(Context context) {
        return 0xff000000;
        return 0xff89c2c2;
    }

    @Override
    public int getSideBarColor(Context context) {
        return 0xffffffff;
        return 0xff5bb4b4;
    }
}
Loading