Always place notification dots directly on adaptive icon path
- Calculate point on icon path nearest to top right corner, and use that as center for the dot - Cleanup code related to dot offset Test: Set each style (different icon shape) and verify dot is in correct placement for each of: - Folders - Icons in folders - Icons in all apps - Icons on workspace Bug: 124414511 Change-Id: I036ed3677e8af222f00d4fad4a36a7e4d9b49ad9
This commit is contained in:
1 parent
227b6e021c
commit
e1cb93f957
4 files changed
+59
-34
No files matched your search
@@ -24,15 +24,13 @@ import android.graphics.PointF;
|
||||
import android.graphics.Rect;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Surface;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.android.launcher3.CellLayout.ContainerType;
|
||||
import com.android.launcher3.graphics.IconShape;
|
||||
import com.android.launcher3.icons.DotRenderer;
|
||||
import com.android.launcher3.icons.IconNormalizer;
|
||||
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
|
||||
|
||||
public class DeviceProfile {
|
||||
|
||||
public final InvariantDeviceProfile inv;
|
||||
@@ -240,7 +238,8 @@ public class DeviceProfile {
|
||||
updateWorkspacePadding();
|
||||
|
||||
// This is done last, after iconSizePx is calculated above.
|
||||
mDotRenderer = new DotRenderer(iconSizePx);
|
||||
mDotRenderer = new DotRenderer(iconSizePx, IconShape.getShapePath(),
|
||||
IconShape.DEFAULT_PATH_SIZE);
|
||||
}
|
||||
|
||||
public DeviceProfile copy(Context context) {
|
||||
|
||||
Reference in new issue
Block a user