Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
This commit is contained in:
1 parent
9d69c8da9a
commit
7185dd63eb
35 files changed
+860
-1292
No files matched your search
@@ -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