mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
This commit is contained in:
@@ -29,6 +29,7 @@ public class LauncherRootView extends InsettableFrameLayout {
|
||||
private int mRightInsetBarWidth;
|
||||
|
||||
private View mAlignedView;
|
||||
private WindowStateListener mWindowStateListener;
|
||||
|
||||
public LauncherRootView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
@@ -117,4 +118,31 @@ public class LauncherRootView extends InsettableFrameLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setWindowStateListener(WindowStateListener listener) {
|
||||
mWindowStateListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
if (mWindowStateListener != null) {
|
||||
mWindowStateListener.onWindowFocusChanged(hasWindowFocus);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onWindowVisibilityChanged(int visibility) {
|
||||
super.onWindowVisibilityChanged(visibility);
|
||||
if (mWindowStateListener != null) {
|
||||
mWindowStateListener.onWindowVisibilityChanged(visibility);
|
||||
}
|
||||
}
|
||||
|
||||
public interface WindowStateListener {
|
||||
|
||||
void onWindowFocusChanged(boolean hasFocus);
|
||||
|
||||
void onWindowVisibilityChanged(int visibility);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user