导航的线换成点

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

@@ -50,7 +50,7 @@
<!-- Keep these behind the workspace so that they are not visible when <!-- Keep these behind the workspace so that they are not visible when
we go into AllApps --> we go into AllApps -->
<com.android.uiuios.pageindicators.WorkspacePageIndicator <com.android.uiuios.pageindicators.PageIndicatorDots
android:id="@+id/page_indicator" android:id="@+id/page_indicator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/vertical_drag_handle_size" android:layout_height="@dimen/vertical_drag_handle_size"

View File

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

View File

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