Changing the overviewState to show appsearch and floating header

Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
This commit is contained in:
Sunny Goyal
2018-03-14 17:51:49 -07:00
parent 9d69c8da9a
commit 7185dd63eb
35 changed files with 860 additions and 1292 deletions

View File

@@ -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);
}
}