mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Using the default search widget in Launcher3
> Removing all logic related to search and voice overlays from Launcher3 > Using the widget provided by global search provider on the homescreen > Removing VoiceButtonProxy, as it is not being used anymore Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
This commit is contained in:
@@ -22,7 +22,6 @@ import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
@@ -50,7 +49,6 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
|
||||
private int mBarHeight;
|
||||
private boolean mDeferOnDragEnd = false;
|
||||
|
||||
private Drawable mPreviousBackground;
|
||||
private boolean mEnableDropDownDropTargets;
|
||||
|
||||
public SearchDropTargetBar(Context context, AttributeSet attrs) {
|
||||
@@ -70,7 +68,10 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
|
||||
dragController.setFlingToDeleteDropTarget(mDeleteDropTarget);
|
||||
mInfoDropTarget.setLauncher(launcher);
|
||||
mDeleteDropTarget.setLauncher(launcher);
|
||||
mQSBSearchBar = launcher.getQsbBar();
|
||||
}
|
||||
|
||||
public void setQsbSearchBar(View qsb) {
|
||||
mQSBSearchBar = qsb;
|
||||
if (mQSBSearchBar != null) {
|
||||
if (mEnableDropDownDropTargets) {
|
||||
mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "translationY", 0,
|
||||
@@ -224,20 +225,6 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
|
||||
}
|
||||
}
|
||||
|
||||
public void onSearchPackagesChanged(boolean searchVisible, boolean voiceVisible) {
|
||||
if (mQSBSearchBar != null) {
|
||||
Drawable bg = mQSBSearchBar.getBackground();
|
||||
if (bg != null && (!searchVisible && !voiceVisible)) {
|
||||
// Save the background and disable it
|
||||
mPreviousBackground = bg;
|
||||
mQSBSearchBar.setBackgroundResource(0);
|
||||
} else if (mPreviousBackground != null && (searchVisible || voiceVisible)) {
|
||||
// Restore the background
|
||||
mQSBSearchBar.setBackground(mPreviousBackground);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Rect getSearchBarBounds() {
|
||||
if (mQSBSearchBar != null) {
|
||||
final int[] pos = new int[2];
|
||||
|
||||
Reference in New Issue
Block a user