Loading quickstep/src/com/android/quickstep/views/FloatingTaskView.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -97,8 +97,9 @@ public class FloatingTaskView extends FrameLayout { floatingView.mOrientationHandler = floatingView.mOrientationHandler = originalView.getRecentsView().getPagedOrientationHandler(); originalView.getRecentsView().getPagedOrientationHandler(); floatingView.mSplitPlaceholderView.setIcon(originalView.getIconView()); floatingView.mSplitPlaceholderView.setIconView(originalView.getIconView(), floatingView.mSplitPlaceholderView.getIcon() launcher.getDeviceProfile().overviewTaskIconDrawableSizePx); floatingView.mSplitPlaceholderView.getIconView() .setRotation(floatingView.mOrientationHandler.getDegreesRotated()); .setRotation(floatingView.mOrientationHandler.getDegreesRotated()); parent.addView(floatingView); parent.addView(floatingView); return floatingView; return floatingView; Loading Loading @@ -141,8 +142,8 @@ public class FloatingTaskView extends FrameLayout { // TODO(194414938) seems like this scale value could be fine tuned, some stretchiness // TODO(194414938) seems like this scale value could be fine tuned, some stretchiness mImageView.setScaleX(1f / scaleX + scaleX * progress); mImageView.setScaleX(1f / scaleX + scaleX * progress); mImageView.setScaleY(1f / scaleY + scaleY * progress); mImageView.setScaleY(1f / scaleY + scaleY * progress); mOrientationHandler.setPrimaryScale(mSplitPlaceholderView.getIcon(), childScaleX); mOrientationHandler.setPrimaryScale(mSplitPlaceholderView.getIconView(), childScaleX); mOrientationHandler.setSecondaryScale(mSplitPlaceholderView.getIcon(), childScaleY); mOrientationHandler.setSecondaryScale(mSplitPlaceholderView.getIconView(), childScaleY); } } protected void initPosition(RectF pos, InsettableFrameLayout.LayoutParams lp) { protected void initPosition(RectF pos, InsettableFrameLayout.LayoutParams lp) { Loading quickstep/src/com/android/quickstep/views/SplitPlaceholderView.java +11 −21 Original line number Original line Diff line number Diff line Loading @@ -24,8 +24,6 @@ import android.widget.FrameLayout; import androidx.annotation.Nullable; import androidx.annotation.Nullable; import com.android.quickstep.util.SplitSelectStateController; public class SplitPlaceholderView extends FrameLayout { public class SplitPlaceholderView extends FrameLayout { public static final FloatProperty<SplitPlaceholderView> ALPHA_FLOAT = public static final FloatProperty<SplitPlaceholderView> ALPHA_FLOAT = Loading @@ -42,34 +40,26 @@ public class SplitPlaceholderView extends FrameLayout { } } }; }; private SplitSelectStateController mSplitController; private IconView mIconView; private IconView mIcon; public SplitPlaceholderView(Context context, AttributeSet attrs) { public SplitPlaceholderView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); } } public void init(SplitSelectStateController controller) { this.mSplitController = controller; } public SplitSelectStateController getSplitController() { return mSplitController; } @Nullable @Nullable public IconView getIcon() { public IconView getIconView() { return mIcon; return mIconView; } } public void setIcon(IconView icon) { public void setIconView(IconView iconView, int iconSize) { if (mIcon == null) { if (mIconView == null) { mIcon = new IconView(getContext()); mIconView = new IconView(getContext()); addView(mIcon); addView(mIconView); } } mIcon.setDrawable(icon.getDrawable()); mIconView.setDrawable(iconView.getDrawable()); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(icon.getLayoutParams()); mIconView.setDrawableSize(iconSize, iconSize); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(iconView.getLayoutParams()); params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER; mIcon.setLayoutParams(params); mIconView.setLayoutParams(params); } } } } Loading
quickstep/src/com/android/quickstep/views/FloatingTaskView.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -97,8 +97,9 @@ public class FloatingTaskView extends FrameLayout { floatingView.mOrientationHandler = floatingView.mOrientationHandler = originalView.getRecentsView().getPagedOrientationHandler(); originalView.getRecentsView().getPagedOrientationHandler(); floatingView.mSplitPlaceholderView.setIcon(originalView.getIconView()); floatingView.mSplitPlaceholderView.setIconView(originalView.getIconView(), floatingView.mSplitPlaceholderView.getIcon() launcher.getDeviceProfile().overviewTaskIconDrawableSizePx); floatingView.mSplitPlaceholderView.getIconView() .setRotation(floatingView.mOrientationHandler.getDegreesRotated()); .setRotation(floatingView.mOrientationHandler.getDegreesRotated()); parent.addView(floatingView); parent.addView(floatingView); return floatingView; return floatingView; Loading Loading @@ -141,8 +142,8 @@ public class FloatingTaskView extends FrameLayout { // TODO(194414938) seems like this scale value could be fine tuned, some stretchiness // TODO(194414938) seems like this scale value could be fine tuned, some stretchiness mImageView.setScaleX(1f / scaleX + scaleX * progress); mImageView.setScaleX(1f / scaleX + scaleX * progress); mImageView.setScaleY(1f / scaleY + scaleY * progress); mImageView.setScaleY(1f / scaleY + scaleY * progress); mOrientationHandler.setPrimaryScale(mSplitPlaceholderView.getIcon(), childScaleX); mOrientationHandler.setPrimaryScale(mSplitPlaceholderView.getIconView(), childScaleX); mOrientationHandler.setSecondaryScale(mSplitPlaceholderView.getIcon(), childScaleY); mOrientationHandler.setSecondaryScale(mSplitPlaceholderView.getIconView(), childScaleY); } } protected void initPosition(RectF pos, InsettableFrameLayout.LayoutParams lp) { protected void initPosition(RectF pos, InsettableFrameLayout.LayoutParams lp) { Loading
quickstep/src/com/android/quickstep/views/SplitPlaceholderView.java +11 −21 Original line number Original line Diff line number Diff line Loading @@ -24,8 +24,6 @@ import android.widget.FrameLayout; import androidx.annotation.Nullable; import androidx.annotation.Nullable; import com.android.quickstep.util.SplitSelectStateController; public class SplitPlaceholderView extends FrameLayout { public class SplitPlaceholderView extends FrameLayout { public static final FloatProperty<SplitPlaceholderView> ALPHA_FLOAT = public static final FloatProperty<SplitPlaceholderView> ALPHA_FLOAT = Loading @@ -42,34 +40,26 @@ public class SplitPlaceholderView extends FrameLayout { } } }; }; private SplitSelectStateController mSplitController; private IconView mIconView; private IconView mIcon; public SplitPlaceholderView(Context context, AttributeSet attrs) { public SplitPlaceholderView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); } } public void init(SplitSelectStateController controller) { this.mSplitController = controller; } public SplitSelectStateController getSplitController() { return mSplitController; } @Nullable @Nullable public IconView getIcon() { public IconView getIconView() { return mIcon; return mIconView; } } public void setIcon(IconView icon) { public void setIconView(IconView iconView, int iconSize) { if (mIcon == null) { if (mIconView == null) { mIcon = new IconView(getContext()); mIconView = new IconView(getContext()); addView(mIcon); addView(mIconView); } } mIcon.setDrawable(icon.getDrawable()); mIconView.setDrawable(iconView.getDrawable()); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(icon.getLayoutParams()); mIconView.setDrawableSize(iconSize, iconSize); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(iconView.getLayoutParams()); params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER; mIcon.setLayoutParams(params); mIconView.setLayoutParams(params); } } } }