mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Implement initial transient Taskbar EDU tooltips.
Since this tooltip looks and behaves differently than the existing EDU sheet, it has its own view and controller implementations (I also may have wanted to write some Kotlin). To keep transient taskbar open while on the second EDU step, another autohide suspend flag is defined. Additionally, special casing is added to avoid hiding transient taskbar if autohiding is currently suspended. Tooltips use the same assets as the bottom sheet for now, and are scaled down to fit the tooltip dimensions. Reset `Taskbar Education` in Developer Options to try EDU again. [Demos] - First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png - Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png Test: Manual Test: Open app, see swipe-up tooltip. Test: Swipe up to show transient taskbar, see features tooltip. Bug: 263157739 Fix: 258460203 Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
This commit is contained in:
@@ -20,6 +20,8 @@ import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.util.OnboardingPrefs;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
@@ -32,10 +34,12 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
|
||||
|
||||
protected final LayoutInflater mLayoutInflater;
|
||||
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
|
||||
private final OnboardingPrefs<BaseTaskbarContext> mOnboardingPrefs;
|
||||
|
||||
public BaseTaskbarContext(Context windowContext) {
|
||||
super(windowContext, Themes.getActivityThemeRes(windowContext));
|
||||
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
|
||||
mOnboardingPrefs = new OnboardingPrefs<>(this, LauncherPrefs.getPrefs(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +52,11 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
|
||||
return mDPChangeListeners;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnboardingPrefs<BaseTaskbarContext> getOnboardingPrefs() {
|
||||
return mOnboardingPrefs;
|
||||
}
|
||||
|
||||
/** Callback invoked when a drag is initiated within this context. */
|
||||
public abstract void onDragStart();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user