Apply visuals for editor
Change-Id: I10b35a9a7464e9939a4ddbf723d5f60073d537fd
diff --git a/res/color-finger/dialer_button_text.xml b/res/color/dialer_button_text.xml
similarity index 100%
rename from res/color-finger/dialer_button_text.xml
rename to res/color/dialer_button_text.xml
diff --git a/res/color-finger/kind_title.xml b/res/color/kind_title.xml
similarity index 100%
rename from res/color-finger/kind_title.xml
rename to res/color/kind_title.xml
diff --git a/res/color-finger/tab_indicator_text.xml b/res/color/tab_indicator_text.xml
similarity index 100%
rename from res/color-finger/tab_indicator_text.xml
rename to res/color/tab_indicator_text.xml
diff --git a/res/layout-xlarge/contact_editor_activity.xml b/res/layout-xlarge/contact_editor_activity.xml
index 09bc8de..3b6acb9 100644
--- a/res/layout-xlarge/contact_editor_activity.xml
+++ b/res/layout-xlarge/contact_editor_activity.xml
@@ -14,17 +14,16 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingLeft="30dip"
- android:paddingRight="30dip"
+ android:paddingLeft="160dip"
+ android:paddingRight="160dip"
+ android:background="@drawable/contact_list_bg"
>
<fragment class="com.android.contacts.views.editor.ContactEditorFragment"
android:id="@+id/contact_editor_fragment"
android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="1" />
-</LinearLayout>
+ android:layout_height="match_parent" />
+</FrameLayout>
diff --git a/res/layout-xlarge/contact_editor_fragment.xml b/res/layout-xlarge/contact_editor_fragment.xml
new file mode 100644
index 0000000..d66f8b4
--- /dev/null
+++ b/res/layout-xlarge/contact_editor_fragment.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+>
+
+ <!-- Background -->
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <View
+ android:layout_width="208dip"
+ android:layout_height="match_parent"
+ android:background="@drawable/contact_view_background_left" />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#bff3f3f3" />
+ </LinearLayout>
+
+ <!-- Content -->
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true"
+ >
+
+ <LinearLayout android:id="@+id/editors"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ />
+
+ </ScrollView>
+</FrameLayout>
diff --git a/res/layout-xlarge/item_contact_editor.xml b/res/layout-xlarge/item_contact_editor.xml
new file mode 100644
index 0000000..f543b61
--- /dev/null
+++ b/res/layout-xlarge/item_contact_editor.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<com.android.contacts.ui.widget.ContactEditorView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+>
+
+ <!-- Account info header -->
+ <RelativeLayout android:id="@+id/header"
+ android:layout_height="64dip"
+ android:layout_width="match_parent"
+ android:background="@android:drawable/list_selector_background"
+ >
+
+ <ImageView android:id="@+id/header_color_bar"
+ android:layout_width="match_parent"
+ android:layout_height="4dip"
+ android:layout_marginBottom="5dip"
+ android:background="@color/edit_divider"
+ />
+
+ <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_alignParentRight="true"
+ android:layout_below="@id/header_color_bar"
+ />
+
+ <TextView android:id="@+id/header_account_type"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@+id/header_icon"
+ android:layout_alignTop="@id/header_icon"
+ android:layout_marginTop="-4dip"
+
+ android:textSize="24sp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:singleLine="true"
+ />
+
+ <TextView android:id="@+id/header_account_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@+id/header_icon"
+ android:layout_alignBottom="@+id/header_icon"
+ android:layout_marginBottom="2dip"
+
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorPrimary"
+ android:singleLine="true"
+ />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_alignParentBottom="true"
+
+ android:background="?android:attr/listDivider"
+ />
+ </RelativeLayout>
+
+ <LinearLayout
+ android:id="@+id/body"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <FrameLayout
+ android:id="@+id/stub_photo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="128dip"
+ android:paddingTop="10dip">
+
+ <include
+ android:id="@+id/edit_photo"
+ layout="@layout/item_photo_editor" />
+
+ </FrameLayout>
+
+ <com.android.contacts.ui.widget.GenericEditorView
+ android:id="@+id/edit_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingRight="?android:attr/scrollbarSize"
+ android:paddingLeft="230dip"
+ android:layout_below="@id/stub_photo"
+ android:layout_marginTop="6dip"
+ android:layout_marginBottom="4dip" />
+
+ <ViewStub android:id="@+id/aggregation_suggestion_stub"
+ android:inflatedId="@+id/aggregation_suggestion"
+ android:layout="@layout/aggregation_suggestions"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="230dip"
+ android:visibility="visible"/>
+
+ <LinearLayout
+ android:id="@+id/sect_fields"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="230dip"
+ android:orientation="vertical"
+ />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_alignParentBottom="true"
+ android:background="?android:attr/listDivider"
+ />
+
+ <Button
+ android:id="@+id/button_add_field"
+ android:text="@string/add_field"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:layout_marginTop="10dip"
+ />
+ </LinearLayout>
+</com.android.contacts.ui.widget.ContactEditorView>
diff --git a/res/layout-xlarge/item_photo_editor.xml b/res/layout-xlarge/item_photo_editor.xml
new file mode 100644
index 0000000..b981131
--- /dev/null
+++ b/res/layout-xlarge/item_photo_editor.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<com.android.contacts.ui.widget.PhotoEditorView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/edit_photo_size"
+ android:layout_height="@dimen/edit_photo_size"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/ic_menu_add_picture"
+ android:cropToPadding="true"
+ android:scaleType="center"
+ android:background="@drawable/btn_contact_picture"
+ android:contentDescription="@string/description_contact_photo"
+ android:gravity="center" />
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
index 300c9d9..9f3f491 100644
--- a/res/values-xlarge/dimens.xml
+++ b/res/values-xlarge/dimens.xml
@@ -18,4 +18,5 @@
<!-- Size of the text in the aizy visual scroll control -->
<dimen name="aizy_text_size">12sp</dimen>
+ <dimen name="edit_photo_size">96dip</dimen>
</resources>