Swaps position of expand button and bell icon.
This change puts the expand caret at the end of the notification header if the new interruption model is turned on, and moves the bell icon on noisy notifications from the end of the header to directly after the header text. Test: manually Change-Id: I2a97f80920598f5f99f2d9c3b14d58858e1de1bb
This commit is contained in:
@@ -218,11 +218,6 @@ public class NotificationHeaderView extends ViewGroup {
|
||||
layoutRight = end - paddingEnd;
|
||||
end = layoutLeft = layoutRight - child.getMeasuredWidth();
|
||||
}
|
||||
if (child == mAudiblyAlertedIcon) {
|
||||
int paddingEnd = mContentEndMargin;
|
||||
layoutRight = end - paddingEnd;
|
||||
end = layoutLeft = layoutRight - child.getMeasuredWidth();
|
||||
}
|
||||
if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
||||
int ltrLeft = layoutLeft;
|
||||
layoutLeft = getWidth() - layoutRight;
|
||||
|
||||
@@ -115,17 +115,6 @@
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/expand_button_content_description_collapsed"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/profile_badge"
|
||||
android:layout_width="@dimen/notification_badge_size"
|
||||
android:layout_height="@dimen/notification_badge_size"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:paddingTop="1dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/notification_work_profile_content_description"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/alerted_icon"
|
||||
android:layout_width="@dimen/notification_alerted_size"
|
||||
@@ -138,6 +127,17 @@
|
||||
android:contentDescription="@string/notification_alerted_content_description"
|
||||
android:src="@drawable/ic_notifications_alerted"
|
||||
android:tint="@color/notification_secondary_text_color_light"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/profile_badge"
|
||||
android:layout_width="@dimen/notification_badge_size"
|
||||
android:layout_height="@dimen/notification_badge_size"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:paddingTop="1dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/notification_work_profile_content_description"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/app_ops"
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.android.systemui.statusbar.TransformableView;
|
||||
import com.android.systemui.statusbar.ViewTransformationHelper;
|
||||
import com.android.systemui.statusbar.notification.CustomInterpolatorTransformation;
|
||||
import com.android.systemui.statusbar.notification.ImageTransformState;
|
||||
import com.android.systemui.statusbar.notification.NotificationUtils;
|
||||
import com.android.systemui.statusbar.notification.TransformState;
|
||||
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
||||
|
||||
@@ -69,7 +70,8 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper {
|
||||
protected NotificationHeaderViewWrapper(Context ctx, View view, ExpandableNotificationRow row) {
|
||||
super(ctx, view, row);
|
||||
mShowExpandButtonAtEnd = ctx.getResources().getBoolean(
|
||||
R.bool.config_showNotificationExpandButtonAtEnd);
|
||||
R.bool.config_showNotificationExpandButtonAtEnd)
|
||||
|| NotificationUtils.useNewInterruptionModel(ctx);
|
||||
mTransformationHelper = new ViewTransformationHelper();
|
||||
|
||||
// we want to avoid that the header clashes with the other text when transforming
|
||||
|
||||
Reference in New Issue
Block a user