Material design of common edit screen fields
The normal edit screen fields, such as phone number and location,
have been updated to look like the new Material design mocks. I expect
this to be the largest CL needed to finish b/18004959.
Aspects of the Editor that haven't been touched in this CL
- readonly editor
- collapse nickname and phonetic name into StructuredNameEditorView. Then make
sure the layout is correct
- photo editor
- Material insert/delete interpolators (maybe fast_out_slow_in)
- account header
Some complicated/weird parts of the CL:
-KindSectionView no longer displays an "Add details" button. Instead
it always shows an additional empty row for each mimeType. The logic
that handles this is mostly inside #updateEmptyEditors(). A lot of code
could be deleted from RawContactEditorView because of this.
-LabeledEditorView's adapter displays TextView's inside Spinner. In order
to make the TextViews look like EditTexts, I set the EditText's background
(so the 9patch padding is used) and then later remove the background.
-Instead of keeping an expansion_view_container in every single field,
I only kept it where it was needed. As a result, I needed to add
null checks into the TextFieldsEditorView base class.
-I made an effort to reduce the depth of the view hierarchy and reduce
the use of LinearLayout weights for performance reasons, when it was
easy to do so
Bug: 18004959
Change-Id: I5934ca189b66468834faf3bb995b172ae2f90bed
diff --git a/res/layout/edit_date_picker.xml b/res/layout/edit_date_picker.xml
index e2c4278..16bc5be 100644
--- a/res/layout/edit_date_picker.xml
+++ b/res/layout/edit_date_picker.xml
@@ -16,19 +16,12 @@
-->
<!-- Button to select a date in the contact editor. -->
-
<Button
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/date_view"
style="@style/SpinnerButtonStyle"
- android:layout_width="0dip"
+ android:layout_width="match_parent"
android:layout_height="@dimen/editor_min_line_item_height"
android:layout_weight="1"
- android:gravity="center_vertical"
- android:layout_marginLeft="@dimen/editor_field_left_padding"
- android:layout_marginRight="@dimen/editor_field_right_padding"
- android:layout_marginStart="@dimen/editor_field_left_padding"
- android:layout_marginEnd="@dimen/editor_field_right_padding"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:paddingStart="12dip"
- android:paddingEnd="@dimen/editor_spinner_end_padding_workaround" />
+ android:textSize="@dimen/editor_form_text_size"
+ android:paddingRight="@dimen/editor_spinner_right_padding_workaround" />