diff options
author | Michael Kwan <mkwan@google.com> | 2017-09-26 13:21:10 -0700 |
---|---|---|
committer | Michael Kwan <mkwan@google.com> | 2017-10-05 16:40:49 -0700 |
commit | 60fa05ee6911c058dd2c490881debc98de94c11e (patch) | |
tree | cfa238cc100c1bfbfac4cb71ebbd3da1edbf7461 /res | |
parent | e8364ff5b8b28f9bd273e21c15e7f80d782a0956 (diff) | |
download | MediaProvider-60fa05ee6911c058dd2c490881debc98de94c11e.tar.gz |
Fix list item layouts to match watch styles.
Bug: 66100342
Test: manual inspection
Change-Id: I6d43f7740415959f1ae12154098750d902401d47
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/ic_add_padded.xml | 22 | ||||
-rw-r--r-- | res/layout-watch/add_ringtone_item.xml | 29 | ||||
-rw-r--r-- | res/layout-watch/radio_with_work_badge.xml | 47 |
3 files changed, 98 insertions, 0 deletions
diff --git a/res/drawable/ic_add_padded.xml b/res/drawable/ic_add_padded.xml new file mode 100644 index 000000000..c37686789 --- /dev/null +++ b/res/drawable/ic_add_padded.xml @@ -0,0 +1,22 @@ +<!-- + Copyright (C) 2017 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. +--> + +<inset xmlns:android="http://schemas.android.com/apk/res/android" + android:drawable="@drawable/ic_add" + android:insetTop="4dp" + android:insetRight="4dp" + android:insetBottom="4dp" + android:insetLeft="4dp"/> diff --git a/res/layout-watch/add_ringtone_item.xml b/res/layout-watch/add_ringtone_item.xml new file mode 100644 index 000000000..48e501fc7 --- /dev/null +++ b/res/layout-watch/add_ringtone_item.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2017 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. +--> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/add_ringtone_text" + android:textColor="?android:attr/colorAccent" + android:gravity="center_vertical" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:drawableStart="@drawable/ic_add_padded" + android:drawablePadding="8dp" + android:ellipsize="marquee" /> diff --git a/res/layout-watch/radio_with_work_badge.xml b/res/layout-watch/radio_with_work_badge.xml new file mode 100644 index 000000000..0e11621e5 --- /dev/null +++ b/res/layout-watch/radio_with_work_badge.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2017 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.providers.media.CheckedListItem xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:background="?android:attr/selectableItemBackground" + > + + <CheckedTextView + android:id="@+id/checked_text_view" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?android:attr/textColorAlertDialogListItem" + android:gravity="center_vertical" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:drawableStart="?android:attr/listChoiceIndicatorSingle" + android:drawablePadding="8dp" + android:ellipsize="marquee" + android:layout_toLeftOf="@+id/work_icon" + android:maxLines="3" /> + + <ImageView + android:id="@id/work_icon" + android:layout_width="18dp" + android:layout_height="18dp" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:scaleType="centerCrop" + android:layout_marginRight="20dp" /> +</com.android.providers.media.CheckedListItem> |