diff options
17 files changed, 31 insertions, 18 deletions
diff --git a/packages/SystemUI/res/layout/people_space_initial_layout.xml b/packages/SystemUI/res/layout/people_space_initial_layout.xml index c57ec345ba57..98920417b0ef 100644 --- a/packages/SystemUI/res/layout/people_space_initial_layout.xml +++ b/packages/SystemUI/res/layout/people_space_initial_layout.xml @@ -22,7 +22,8 @@ <LinearLayout android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:clipToOutline="true" + android:id="@android:id/background" android:orientation="horizontal" android:gravity="center" android:layout_gravity="top" diff --git a/packages/SystemUI/res/layout/people_space_placeholder_layout.xml b/packages/SystemUI/res/layout/people_space_placeholder_layout.xml index 76f7b98166ed..683e076ddafe 100644 --- a/packages/SystemUI/res/layout/people_space_placeholder_layout.xml +++ b/packages/SystemUI/res/layout/people_space_placeholder_layout.xml @@ -22,7 +22,8 @@ <LinearLayout android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:clipToOutline="true" + android:id="@android:id/background" android:orientation="horizontal" android:gravity="center" android:layout_gravity="center" diff --git a/packages/SystemUI/res/layout/people_space_widget_item.xml b/packages/SystemUI/res/layout/people_space_widget_item.xml index 17d0c561c646..492d3abcb6d0 100644 --- a/packages/SystemUI/res/layout/people_space_widget_item.xml +++ b/packages/SystemUI/res/layout/people_space_widget_item.xml @@ -21,7 +21,8 @@ android:orientation="vertical"> <LinearLayout android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:clipToOutline="true" + android:id="@android:id/background" android:orientation="vertical" android:padding="4dp" android:layout_marginBottom="2dp" diff --git a/packages/SystemUI/res/layout/people_tile_empty_layout.xml b/packages/SystemUI/res/layout/people_tile_empty_layout.xml index 8e9ebc69c54c..f115002577fd 100644 --- a/packages/SystemUI/res/layout/people_tile_empty_layout.xml +++ b/packages/SystemUI/res/layout/people_tile_empty_layout.xml @@ -14,9 +14,10 @@ ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/item" + android:id="@android:id/background" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:background="@drawable/people_tile_empty_background" + android:clipToOutline="true" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/packages/SystemUI/res/layout/people_tile_large_empty.xml b/packages/SystemUI/res/layout/people_tile_large_empty.xml index d4a8e15101bd..f2a3922aa278 100644 --- a/packages/SystemUI/res/layout/people_tile_large_empty.xml +++ b/packages/SystemUI/res/layout/people_tile_large_empty.xml @@ -14,8 +14,9 @@ ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/item" + android:id="@android:id/background" android:background="@drawable/people_space_tile_view_card" + android:clipToOutline="true" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:layout_width="match_parent" android:layout_height="match_parent" diff --git a/packages/SystemUI/res/layout/people_tile_large_with_content.xml b/packages/SystemUI/res/layout/people_tile_large_with_content.xml index 3f78fe752609..6da17bc4188f 100644 --- a/packages/SystemUI/res/layout/people_tile_large_with_content.xml +++ b/packages/SystemUI/res/layout/people_tile_large_with_content.xml @@ -126,6 +126,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/people_space_content_background" + android:clipToOutline="true" android:gravity="center" android:scaleType="centerCrop" /> diff --git a/packages/SystemUI/res/layout/people_tile_large_with_notification_content.xml b/packages/SystemUI/res/layout/people_tile_large_with_notification_content.xml index 60ff68edc3f4..c18a59a25812 100644 --- a/packages/SystemUI/res/layout/people_tile_large_with_notification_content.xml +++ b/packages/SystemUI/res/layout/people_tile_large_with_notification_content.xml @@ -15,7 +15,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:id="@android:id/background" android:clipToOutline="true" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:layout_gravity="center" diff --git a/packages/SystemUI/res/layout/people_tile_large_with_status_content.xml b/packages/SystemUI/res/layout/people_tile_large_with_status_content.xml index cbc6ea860044..508a2555341e 100644 --- a/packages/SystemUI/res/layout/people_tile_large_with_status_content.xml +++ b/packages/SystemUI/res/layout/people_tile_large_with_status_content.xml @@ -15,7 +15,7 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:id="@android:id/background" android:clipToOutline="true" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:layout_gravity="center" diff --git a/packages/SystemUI/res/layout/people_tile_medium_empty.xml b/packages/SystemUI/res/layout/people_tile_medium_empty.xml index ebb61c94eca5..4a186831a2b0 100644 --- a/packages/SystemUI/res/layout/people_tile_medium_empty.xml +++ b/packages/SystemUI/res/layout/people_tile_medium_empty.xml @@ -21,7 +21,8 @@ android:orientation="vertical"> <LinearLayout android:background="@drawable/people_space_tile_view_card" - android:id="@+id/item" + android:clipToOutline="true" + android:id="@android:id/background" android:gravity="center" android:paddingHorizontal="16dp" android:orientation="horizontal" diff --git a/packages/SystemUI/res/layout/people_tile_medium_with_content.xml b/packages/SystemUI/res/layout/people_tile_medium_with_content.xml index 0a5bf1d7c49f..9314685bc402 100644 --- a/packages/SystemUI/res/layout/people_tile_medium_with_content.xml +++ b/packages/SystemUI/res/layout/people_tile_medium_with_content.xml @@ -18,8 +18,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:theme="@android:style/Theme.DeviceDefault.DayNight" - android:id="@+id/item" + android:id="@android:id/background" android:background="@drawable/people_space_tile_view_card" + android:clipToOutline="true" android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="match_parent" @@ -83,6 +84,7 @@ android:id="@+id/image" android:gravity="center" android:background="@drawable/people_space_content_background" + android:clipToOutline="true" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" /> diff --git a/packages/SystemUI/res/layout/people_tile_small.xml b/packages/SystemUI/res/layout/people_tile_small.xml index 553b8a43e033..44e68e544271 100644 --- a/packages/SystemUI/res/layout/people_tile_small.xml +++ b/packages/SystemUI/res/layout/people_tile_small.xml @@ -20,11 +20,12 @@ android:layout_height="match_parent"> <LinearLayout - android:id="@+id/item" + android:id="@android:id/background" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:background="@drawable/people_space_tile_view_card" + android:clipToOutline="true" android:orientation="vertical" android:paddingHorizontal="4dp" android:paddingTop="6dp" diff --git a/packages/SystemUI/res/layout/people_tile_suppressed_layout.xml b/packages/SystemUI/res/layout/people_tile_suppressed_layout.xml index b151c6065b9a..4820a35ac5b3 100644 --- a/packages/SystemUI/res/layout/people_tile_suppressed_layout.xml +++ b/packages/SystemUI/res/layout/people_tile_suppressed_layout.xml @@ -14,9 +14,10 @@ ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/item" + android:id="@android:id/background" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:background="@drawable/people_tile_suppressed_background" + android:clipToOutline="true" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_horizontal.xml b/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_horizontal.xml index b53c88beee9e..f7e12eba689d 100644 --- a/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_horizontal.xml +++ b/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_horizontal.xml @@ -14,10 +14,11 @@ ~ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:theme="@android:style/Theme.DeviceDefault.DayNight" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" - android:id="@+id/item" + android:id="@android:id/background" android:background="@drawable/people_tile_suppressed_background" android:clipToOutline="true" android:padding="8dp" diff --git a/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_vertical.xml b/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_vertical.xml index c79cdad0d1f7..c488d890986d 100644 --- a/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_vertical.xml +++ b/packages/SystemUI/res/layout/people_tile_with_suppression_detail_content_vertical.xml @@ -15,10 +15,11 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + android:theme="@android:style/Theme.DeviceDefault.DayNight" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" - android:id="@+id/item" + android:id="@android:id/background" android:background="@drawable/people_tile_suppressed_background" android:clipToOutline="true" android:padding="8dp" diff --git a/packages/SystemUI/res/layout/people_tile_work_profile_quiet_layout.xml b/packages/SystemUI/res/layout/people_tile_work_profile_quiet_layout.xml index 25ab5a61ffee..1ccfb075553c 100644 --- a/packages/SystemUI/res/layout/people_tile_work_profile_quiet_layout.xml +++ b/packages/SystemUI/res/layout/people_tile_work_profile_quiet_layout.xml @@ -15,9 +15,10 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" - android:id="@+id/item" + android:id="@android:id/background" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:background="@drawable/people_tile_suppressed_background" + android:clipToOutline="true" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java index d9e2648750a4..93a3f81fdd6b 100644 --- a/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java +++ b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.java @@ -89,7 +89,7 @@ public class PeopleSpaceActivity extends Activity { // The Tile preview has colorBackground as its background. Change it so it's different // than the activity's background. - LinearLayout item = findViewById(R.id.item); + LinearLayout item = findViewById(android.R.id.background); GradientDrawable shape = (GradientDrawable) item.getBackground(); final TypedArray ta = mContext.getTheme().obtainStyledAttributes( new int[]{com.android.internal.R.attr.colorSurface}); diff --git a/packages/SystemUI/src/com/android/systemui/people/PeopleTileViewHelper.java b/packages/SystemUI/src/com/android/systemui/people/PeopleTileViewHelper.java index 4a8775fc5bb4..a388853be8a8 100644 --- a/packages/SystemUI/src/com/android/systemui/people/PeopleTileViewHelper.java +++ b/packages/SystemUI/src/com/android/systemui/people/PeopleTileViewHelper.java @@ -453,7 +453,6 @@ public class PeopleTileViewHelper { views.setViewVisibility(R.id.availability, View.GONE); } - views.setBoolean(R.id.image, "setClipToOutline", true); views.setImageViewBitmap(R.id.person_icon, getPersonIconBitmap(mContext, mTile, maxAvatarSize)); return views; @@ -481,7 +480,7 @@ public class PeopleTileViewHelper { PeopleSpaceWidgetProvider.EXTRA_NOTIFICATION_KEY, mTile.getNotificationKey()); } - views.setOnClickPendingIntent(R.id.item, PendingIntent.getActivity( + views.setOnClickPendingIntent(android.R.id.background, PendingIntent.getActivity( mContext, mAppWidgetId, activityIntent, @@ -504,7 +503,7 @@ public class PeopleTileViewHelper { int outerPadding = mLayoutSize == LAYOUT_LARGE ? 16 : 8; int outerPaddingPx = dpToPx(outerPadding); views.setViewPadding( - R.id.item, + android.R.id.background, outerPaddingPx, outerPaddingPx, outerPaddingPx, |