Loading res/layout/item_photo_editor_readonly.xml +8 −9 Original line number Diff line number Diff line Loading @@ -24,24 +24,23 @@ <ImageView android:id="@+id/kind_icon" android:src="@drawable/ic_camera_alt_black_24dp" android:layout_marginTop="8dp" android:layout_marginTop="0dp" android:contentDescription="@string/header_photo_entry" style="@style/EditKindIconStyle" /> <!-- Needs 10dp of top padding, in order get a total of 32dp of padding between this view and the previous DataKindSection. Note that EditTexts in other editor.xml files have this padding built in. Similarly, we need to add 4dp of start margin to make up for the padding that an EditText would have in this image's place. --> <!-- We need to add 2dp of start margin to make up for the padding that a TextView would have in this image's place. We add 2dp of top margin, so that icon drawable is a little below the top of this ImageView. --> <ImageView android:id="@+id/photo" android:layout_width="72dip" android:layout_height="72dip" android:cropToPadding="true" android:scaleType="centerCrop" android:layout_marginTop="10dp" android:layout_marginStart="4dp" android:layout_marginTop="2dp" android:layout_marginStart="2dp" android:contentDescription="@string/description_contact_photo" android:layout_marginBottom="@dimen/editor_padding_below_photo" android:layout_marginBottom="@dimen/editor_padding_around_read_only_photo_editor" android:gravity="start" /> Loading @@ -53,7 +52,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/editor_delete_button_width" android:layout_marginTop="10dp" android:layout_marginTop="2dp" android:textSize="@dimen/editor_form_text_size" android:text="@string/primary_photo" /> </view> res/layout/item_read_only_field.xml +4 −5 Original line number Diff line number Diff line Loading @@ -19,11 +19,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/editor_delete_button_width" android:layout_marginBottom="@dimen/editor_padding_between_editor_views" android:layout_marginBottom="@dimen/editor_padding_between_read_only_editor_views" android:orientation="horizontal"> <ImageView android:id="@+id/kind_icon" android:layout_marginTop="2dp" style="@style/EditKindIconStyle" /> <LinearLayout Loading @@ -32,24 +33,22 @@ android:layout_height="wrap_content" android:orientation="vertical"> <EditText <TextView android:id="@+id/data" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/editor_min_line_item_height" android:textSize="@dimen/editor_form_text_size" android:textColor="?android:attr/textColorSecondary" android:singleLine="true" android:saveEnabled="false" android:enabled="false"/> <EditText <TextView android:id="@+id/type" android:layout_width="@dimen/editor_type_label_width" android:layout_height="wrap_content" android:textSize="@dimen/editor_form_text_size" android:textColor="?android:attr/textColorSecondary" android:minHeight="@dimen/editor_min_line_item_height" android:singleLine="true" android:saveEnabled="false" android:enabled="false"/> Loading res/layout/raw_contact_readonly_editor_view.xml +8 −8 Original line number Diff line number Diff line Loading @@ -29,26 +29,26 @@ android:layout_height="wrap_content" android:orientation="vertical" > <!-- Want 16dp of apparent top padding. Since EditText has 10dp of inset/padding built in, only set marginTop=6dp. --> <!-- Want 16dp of apparent top padding. Since TextView has 4dp of inset/padding built in, only set marginTop=12dp. --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/editor_min_line_item_height" android:layout_marginBottom="@dimen/editor_padding_between_editor_views" android:layout_marginTop="6dp" android:layout_marginBottom="@dimen/editor_padding_around_read_only_photo_editor" android:layout_marginTop="12dp" android:orientation="horizontal"> <ImageView android:id="@+id/kind_icon" android:layout_marginTop="2dp" android:src="@drawable/ic_person_black_24dp" android:contentDescription="@string/header_name_entry" style="@style/EditKindIconStyle" /> <EditText <TextView android:id="@+id/read_only_name" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="wrap_content" android:layout_marginRight="@dimen/editor_delete_button_width" android:singleLine="true" android:textSize="@dimen/editor_form_text_size" Loading @@ -66,7 +66,7 @@ android:text="@string/edit_contact" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginTop="4dp" android:layout_marginBottom="@dimen/editor_padding_below_photo" android:layout_marginEnd="13dip" android:layout_marginStart="13dip"/> Loading res/values/dimens.xml +8 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,14 @@ to give 32dp of apparent padding between EditText's in the Raw Contact Editor. --> <dimen name="editor_padding_between_editor_views">20dp</dimen> <!-- Padding below every readonly editor view. This value is chosen to give 32dp of apparent padding between TextView's in the readonly Raw Contact Editor. --> <dimen name="editor_padding_between_read_only_editor_views">25dp</dimen> <!-- Padding above and below the photo editor. This value is chosen to give 32dp of apparent padding between TextView's and the photo's ImageView. --> <dimen name="editor_padding_around_read_only_photo_editor">28dp</dimen> <!-- Padding below the photo editor. This value is larger than editor_padding_between_editor_views, since ImageView's don't have space between the bottom of their visual bottom, like an EditText does. --> Loading Loading
res/layout/item_photo_editor_readonly.xml +8 −9 Original line number Diff line number Diff line Loading @@ -24,24 +24,23 @@ <ImageView android:id="@+id/kind_icon" android:src="@drawable/ic_camera_alt_black_24dp" android:layout_marginTop="8dp" android:layout_marginTop="0dp" android:contentDescription="@string/header_photo_entry" style="@style/EditKindIconStyle" /> <!-- Needs 10dp of top padding, in order get a total of 32dp of padding between this view and the previous DataKindSection. Note that EditTexts in other editor.xml files have this padding built in. Similarly, we need to add 4dp of start margin to make up for the padding that an EditText would have in this image's place. --> <!-- We need to add 2dp of start margin to make up for the padding that a TextView would have in this image's place. We add 2dp of top margin, so that icon drawable is a little below the top of this ImageView. --> <ImageView android:id="@+id/photo" android:layout_width="72dip" android:layout_height="72dip" android:cropToPadding="true" android:scaleType="centerCrop" android:layout_marginTop="10dp" android:layout_marginStart="4dp" android:layout_marginTop="2dp" android:layout_marginStart="2dp" android:contentDescription="@string/description_contact_photo" android:layout_marginBottom="@dimen/editor_padding_below_photo" android:layout_marginBottom="@dimen/editor_padding_around_read_only_photo_editor" android:gravity="start" /> Loading @@ -53,7 +52,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/editor_delete_button_width" android:layout_marginTop="10dp" android:layout_marginTop="2dp" android:textSize="@dimen/editor_form_text_size" android:text="@string/primary_photo" /> </view>
res/layout/item_read_only_field.xml +4 −5 Original line number Diff line number Diff line Loading @@ -19,11 +19,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/editor_delete_button_width" android:layout_marginBottom="@dimen/editor_padding_between_editor_views" android:layout_marginBottom="@dimen/editor_padding_between_read_only_editor_views" android:orientation="horizontal"> <ImageView android:id="@+id/kind_icon" android:layout_marginTop="2dp" style="@style/EditKindIconStyle" /> <LinearLayout Loading @@ -32,24 +33,22 @@ android:layout_height="wrap_content" android:orientation="vertical"> <EditText <TextView android:id="@+id/data" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/editor_min_line_item_height" android:textSize="@dimen/editor_form_text_size" android:textColor="?android:attr/textColorSecondary" android:singleLine="true" android:saveEnabled="false" android:enabled="false"/> <EditText <TextView android:id="@+id/type" android:layout_width="@dimen/editor_type_label_width" android:layout_height="wrap_content" android:textSize="@dimen/editor_form_text_size" android:textColor="?android:attr/textColorSecondary" android:minHeight="@dimen/editor_min_line_item_height" android:singleLine="true" android:saveEnabled="false" android:enabled="false"/> Loading
res/layout/raw_contact_readonly_editor_view.xml +8 −8 Original line number Diff line number Diff line Loading @@ -29,26 +29,26 @@ android:layout_height="wrap_content" android:orientation="vertical" > <!-- Want 16dp of apparent top padding. Since EditText has 10dp of inset/padding built in, only set marginTop=6dp. --> <!-- Want 16dp of apparent top padding. Since TextView has 4dp of inset/padding built in, only set marginTop=12dp. --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/editor_min_line_item_height" android:layout_marginBottom="@dimen/editor_padding_between_editor_views" android:layout_marginTop="6dp" android:layout_marginBottom="@dimen/editor_padding_around_read_only_photo_editor" android:layout_marginTop="12dp" android:orientation="horizontal"> <ImageView android:id="@+id/kind_icon" android:layout_marginTop="2dp" android:src="@drawable/ic_person_black_24dp" android:contentDescription="@string/header_name_entry" style="@style/EditKindIconStyle" /> <EditText <TextView android:id="@+id/read_only_name" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="wrap_content" android:layout_marginRight="@dimen/editor_delete_button_width" android:singleLine="true" android:textSize="@dimen/editor_form_text_size" Loading @@ -66,7 +66,7 @@ android:text="@string/edit_contact" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginTop="4dp" android:layout_marginBottom="@dimen/editor_padding_below_photo" android:layout_marginEnd="13dip" android:layout_marginStart="13dip"/> Loading
res/values/dimens.xml +8 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,14 @@ to give 32dp of apparent padding between EditText's in the Raw Contact Editor. --> <dimen name="editor_padding_between_editor_views">20dp</dimen> <!-- Padding below every readonly editor view. This value is chosen to give 32dp of apparent padding between TextView's in the readonly Raw Contact Editor. --> <dimen name="editor_padding_between_read_only_editor_views">25dp</dimen> <!-- Padding above and below the photo editor. This value is chosen to give 32dp of apparent padding between TextView's and the photo's ImageView. --> <dimen name="editor_padding_around_read_only_photo_editor">28dp</dimen> <!-- Padding below the photo editor. This value is larger than editor_padding_between_editor_views, since ImageView's don't have space between the bottom of their visual bottom, like an EditText does. --> Loading