blob: edb6f6162c85704e8af06ee36caaaa0fef74c49a [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->
<!-- A readonly version of item_photo_editor.xml shown in the readonly raw contact editor. -->
<view class="com.android.contacts.editor.PhotoEditorView"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/kind_icon"
android:src="@drawable/ic_camera_alt_black_24dp"
android:layout_marginTop="0dp"
android:contentDescription="@string/header_photo_entry"
style="@style/EditKindIconStyle" />
<!-- 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="2dp"
android:layout_marginStart="2dp"
android:contentDescription="@string/description_contact_photo"
android:layout_marginBottom="@dimen/editor_padding_around_read_only_photo_editor"
android:gravity="start" />
<!-- Don't explicitly set the layout_height in case we need to rely on text wrapping.
For one line, we can expect the height to be 32dp with 16dp text size. -->
<RadioButton
android:id="@+id/primary_checkbox"
android:layout_marginStart="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/editor_delete_button_width"
android:layout_marginTop="2dp"
android:textSize="@dimen/editor_form_text_size"
android:text="@string/primary_photo" />
</view>