导航的线换成点

This commit is contained in:
2020-11-26 18:11:14 +08:00
parent 2435b99034
commit e75261d5a7
4 changed files with 14 additions and 5 deletions

View File

@@ -109,6 +109,7 @@ import com.android.uiuios.logging.UserEventDispatcher.UserEventDelegate;
import com.android.uiuios.model.AppLaunchTracker;
import com.android.uiuios.model.ModelWriter;
import com.android.uiuios.notification.NotificationListener;
import com.android.uiuios.pageindicators.PageIndicatorDots;
import com.android.uiuios.popup.PopupContainerWithArrow;
import com.android.uiuios.popup.PopupDataProvider;
import com.android.uiuios.shortcuts.DeepShortcutManager;
@@ -235,6 +236,8 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
@Thunk Hotseat mHotseat;
private PageIndicatorDots mPageIndicatorDots;
private DropTargetBar mDropTargetBar;
// Main container view for the all apps screen.
@@ -1183,7 +1186,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
mWorkspace.initParentViews(mDragLayer);
mOverviewPanel = findViewById(R.id.overview_panel);
mHotseat = findViewById(R.id.hotseat);
mPageIndicatorDots=findViewById(R.id.page_indicator);
mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
@@ -1425,6 +1428,10 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
return mHotseat;
}
public PageIndicatorDots getIndicatorDots(){
return mPageIndicatorDots;
}
public <T extends View> T getOverviewPanel() {
return (T) mOverviewPanel;
}

View File

@@ -81,6 +81,7 @@ import com.android.uiuios.folder.PreviewBackground;
import com.android.uiuios.graphics.DragPreviewProvider;
import com.android.uiuios.graphics.PreloadIconDrawable;
import com.android.uiuios.graphics.RotationMode;
import com.android.uiuios.pageindicators.PageIndicatorDots;
import com.android.uiuios.pageindicators.WorkspacePageIndicator;
import com.android.uiuios.popup.PopupContainerWithArrow;
import com.android.uiuios.shortcuts.ShortcutDragPreviewProvider;
@@ -110,7 +111,8 @@ import java.util.function.Predicate;
* Each page contains a number of icons, folders or widgets the user can
* interact with. A workspace is meant to be used with a fixed width only.
*/
public class Workspace extends PagedView<WorkspacePageIndicator>
//public class Workspace extends PagedView<WorkspacePageIndicator>
public class Workspace extends PagedView<PageIndicatorDots>
implements DropTarget, DragSource, View.OnTouchListener,
DragController.DragListener, Insettable, LauncherStateManager.StateHandler,
WorkspaceLayoutManager {

View File

@@ -81,7 +81,7 @@ public class SpringLoadedState extends LauncherState {
public void onStateEnabled(Launcher launcher) {
Workspace ws = launcher.getWorkspace();
ws.showPageIndicatorAtCurrentScroll();
ws.getPageIndicator().setShouldAutoHide(false);
// ws.getPageIndicator().setShouldAutoHide(false);
// Prevent any Un/InstallShortcutReceivers from updating the db while we are
// in spring loaded mode
@@ -96,7 +96,7 @@ public class SpringLoadedState extends LauncherState {
@Override
public void onStateDisabled(final Launcher launcher) {
launcher.getWorkspace().getPageIndicator().setShouldAutoHide(true);
// launcher.getWorkspace().getPageIndicator().setShouldAutoHide(true);
// Re-enable any Un/InstallShortcutReceiver and now process any queued items
InstallShortcutReceiver.disableAndFlushInstallQueue(