[UniversalSearchInput] Support search box dynamic height adjustment in
ActivityAllAppsContainerView Previously, ActivityAllAppsContainerView assumed a static height for the search box and relied only on FloatingHeaderView's height calculation. With multi-line search bar, we need to add to the FloatingHeaderView's mMaxTranslation to update the clipping position for the recycler views belowe Bug: b/341795751 Flag: com.android.launcher3.multiline_search_bar Test: http://recall/clips/32f64e77-3522-4873-bc7b-86d844912724 Change-Id: I67aab186e96d7bdecbba454f660d73f0f4408a98
This commit is contained in:
1 parent
07acdf105c
commit
0c7079ece0
3 files changed
+123
No files matched your search
@@ -71,6 +71,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.DragSource;
|
||||
import com.android.launcher3.DropTarget.DragObject;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.InsettableFrameLayout;
|
||||
import com.android.launcher3.R;
|
||||
@@ -764,6 +765,16 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Force header height update with an offset. Used by {@link UniversalSearchInputView} to
|
||||
* request {@link FloatingHeaderView} to update its maxTranslation for multiline search bar.
|
||||
*/
|
||||
public void forceUpdateHeaderHeight(int offset) {
|
||||
if (Flags.multilineSearchBar()) {
|
||||
mHeader.updateSearchBarOffset(offset);
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateHeaderScroll(int scrolledOffset) {
|
||||
float prog1 = Utilities.boundToRange((float) scrolledOffset / mHeaderThreshold, 0f, 1f);
|
||||
int headerColor = getHeaderColor(prog1);
|
||||
|
||||
Reference in new issue
Block a user