Loading libs/WindowManager/Shell/res/layout/bubble_expanded_view.xml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ android:layout_height="wrap_content" android:focusable="true" android:text="@string/manage_bubbles_text" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorPrimary" /> Loading libs/WindowManager/Shell/res/layout/bubble_overflow_container.xml +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ android:text="@string/bubble_overflow_empty_title" android:fontFamily="@*android:string/config_bodyFontFamilyMedium" android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorSecondary" android:layout_width="match_parent" android:layout_height="wrap_content" Loading @@ -66,6 +67,7 @@ android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamily" android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorSecondary" android:text="@string/bubble_overflow_empty_subtitle" android:paddingBottom="@dimen/bubble_empty_overflow_subtitle_padding" Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -715,7 +715,7 @@ public class BubbleController { } if (newConfig.fontScale != mFontScale) { mFontScale = newConfig.fontScale; mStackView.updateFontScale(mFontScale); mStackView.updateFontScale(); } if (newConfig.getLayoutDirection() != mLayoutDirection) { mLayoutDirection = newConfig.getLayoutDirection(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +39 −17 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.SurfaceControl; import android.view.View; Loading Loading @@ -250,26 +251,14 @@ public class BubbleExpandedView extends LinearLayout { protected void onFinishInflate() { super.onFinishInflate(); Resources res = getResources(); mSettingsIcon = findViewById(R.id.settings_button); mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_manage_button_height); mPointerView = findViewById(R.id.pointer_view); mPointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width); mPointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height); mTopPointer = new ShapeDrawable(TriangleShape.create( mPointerWidth, mPointerHeight, true /* pointUp */)); mLeftPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); mCurrentPointer = mTopPointer; mPointerView.setVisibility(INVISIBLE); mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_manage_button_height); mSettingsIcon = findViewById(R.id.settings_button); // Set ActivityView's alpha value as zero, since there is no view content to be shown. // Set TaskView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); mExpandedViewContainer.setOutlineProvider(new ViewOutlineProvider() { Loading @@ -293,7 +282,6 @@ public class BubbleExpandedView extends LinearLayout { applyThemeAttrs(); mExpandedViewPadding = res.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding); setClipToPadding(false); setOnTouchListener((view, motionEvent) -> { if (mTaskView == null) { Loading Loading @@ -354,7 +342,41 @@ public class BubbleExpandedView extends LinearLayout { Resources res = getResources(); mMinHeight = res.getDimensionPixelSize(R.dimen.bubble_expanded_default_height); mOverflowHeight = res.getDimensionPixelSize(R.dimen.bubble_overflow_height); mExpandedViewPadding = res.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding); mPointerMargin = res.getDimensionPixelSize(R.dimen.bubble_pointer_margin); mPointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width); mPointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height); mTopPointer = new ShapeDrawable(TriangleShape.create( mPointerWidth, mPointerHeight, true /* pointUp */)); mLeftPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); if (mSettingsIcon != null) { mSettingsIcon.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } if (mOverflowView != null) { mOverflowView.updateFontSize(); } if (mPointerView != null) { updatePointerView(); } } void updateFontSize() { final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); if (mSettingsIcon != null) { mSettingsIcon.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } if (mOverflowView != null) { mOverflowView.updateFontSize(); } } void applyThemeAttrs() { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java +3 −4 Original line number Diff line number Diff line Loading @@ -216,12 +216,11 @@ public class BubbleFlyoutView extends FrameLayout { super.onDraw(canvas); } void updateFontSize(float fontScale) { void updateFontSize() { final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); final float newFontSize = fontSize * fontScale; mMessageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, newFontSize); mSenderText.setTextSize(TypedValue.COMPLEX_UNIT_PX, newFontSize); mMessageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); mSenderText.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } /* Loading Loading
libs/WindowManager/Shell/res/layout/bubble_expanded_view.xml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ android:layout_height="wrap_content" android:focusable="true" android:text="@string/manage_bubbles_text" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorPrimary" /> Loading
libs/WindowManager/Shell/res/layout/bubble_overflow_container.xml +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ android:text="@string/bubble_overflow_empty_title" android:fontFamily="@*android:string/config_bodyFontFamilyMedium" android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorSecondary" android:layout_width="match_parent" android:layout_height="wrap_content" Loading @@ -66,6 +67,7 @@ android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamily" android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2" android:textSize="@*android:dimen/text_size_body_2_material" android:textColor="?android:attr/textColorSecondary" android:text="@string/bubble_overflow_empty_subtitle" android:paddingBottom="@dimen/bubble_empty_overflow_subtitle_padding" Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -715,7 +715,7 @@ public class BubbleController { } if (newConfig.fontScale != mFontScale) { mFontScale = newConfig.fontScale; mStackView.updateFontScale(mFontScale); mStackView.updateFontScale(); } if (newConfig.getLayoutDirection() != mLayoutDirection) { mLayoutDirection = newConfig.getLayoutDirection(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +39 −17 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.SurfaceControl; import android.view.View; Loading Loading @@ -250,26 +251,14 @@ public class BubbleExpandedView extends LinearLayout { protected void onFinishInflate() { super.onFinishInflate(); Resources res = getResources(); mSettingsIcon = findViewById(R.id.settings_button); mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_manage_button_height); mPointerView = findViewById(R.id.pointer_view); mPointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width); mPointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height); mTopPointer = new ShapeDrawable(TriangleShape.create( mPointerWidth, mPointerHeight, true /* pointUp */)); mLeftPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); mCurrentPointer = mTopPointer; mPointerView.setVisibility(INVISIBLE); mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_manage_button_height); mSettingsIcon = findViewById(R.id.settings_button); // Set ActivityView's alpha value as zero, since there is no view content to be shown. // Set TaskView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); mExpandedViewContainer.setOutlineProvider(new ViewOutlineProvider() { Loading @@ -293,7 +282,6 @@ public class BubbleExpandedView extends LinearLayout { applyThemeAttrs(); mExpandedViewPadding = res.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding); setClipToPadding(false); setOnTouchListener((view, motionEvent) -> { if (mTaskView == null) { Loading Loading @@ -354,7 +342,41 @@ public class BubbleExpandedView extends LinearLayout { Resources res = getResources(); mMinHeight = res.getDimensionPixelSize(R.dimen.bubble_expanded_default_height); mOverflowHeight = res.getDimensionPixelSize(R.dimen.bubble_overflow_height); mExpandedViewPadding = res.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding); mPointerMargin = res.getDimensionPixelSize(R.dimen.bubble_pointer_margin); mPointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width); mPointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height); mTopPointer = new ShapeDrawable(TriangleShape.create( mPointerWidth, mPointerHeight, true /* pointUp */)); mLeftPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, true /* pointLeft */)); mRightPointer = new ShapeDrawable(TriangleShape.createHorizontal( mPointerWidth, mPointerHeight, false /* pointLeft */)); final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); if (mSettingsIcon != null) { mSettingsIcon.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } if (mOverflowView != null) { mOverflowView.updateFontSize(); } if (mPointerView != null) { updatePointerView(); } } void updateFontSize() { final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); if (mSettingsIcon != null) { mSettingsIcon.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } if (mOverflowView != null) { mOverflowView.updateFontSize(); } } void applyThemeAttrs() { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java +3 −4 Original line number Diff line number Diff line Loading @@ -216,12 +216,11 @@ public class BubbleFlyoutView extends FrameLayout { super.onDraw(canvas); } void updateFontSize(float fontScale) { void updateFontSize() { final float fontSize = mContext.getResources() .getDimensionPixelSize(com.android.internal.R.dimen.text_size_body_2_material); final float newFontSize = fontSize * fontScale; mMessageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, newFontSize); mSenderText.setTextSize(TypedValue.COMPLEX_UNIT_PX, newFontSize); mMessageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); mSenderText.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); } /* Loading