Move UnionDecorationHandler to Launcher
- Create base SectionDecorationInfo.java and RecyclerViewAnimationController.java - SearchTransitionController now inherits from RecyclerViewAnimationController where RecyclerViewAnimationController will control animation for private space Bug: 299294792 Test: Verified SearchTransitionController didn't regress by turning off BACKGROUND_DRAWABLES flag. - Verified QL highlight still works - video: https://drive.google.com/file/d/15yjBWofebn6m7VgEnLK6kEYqhC_adJQ3/view?usp=sharing Flag: None Change-Id: If34f4bb199be0e113485279931d2927cb9fad397
This commit is contained in:
@@ -25,6 +25,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.launcher3.BubbleTextView;
|
||||
@@ -92,7 +93,8 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
public int rowAppIndex;
|
||||
// The associated ItemInfoWithIcon for the item
|
||||
public AppInfo itemInfo = null;
|
||||
|
||||
// Private App Decorator
|
||||
public SectionDecorationInfo decorationInfo = null;
|
||||
public AdapterItem(int viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
@@ -125,9 +127,17 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
return itemInfo == null && other.itemInfo == null;
|
||||
}
|
||||
|
||||
/** Sets the alpha of the decorator for this item. Returns true if successful. */
|
||||
public boolean setDecorationFillAlpha(int alpha) {
|
||||
return false;
|
||||
@Nullable
|
||||
public SectionDecorationInfo getDecorationInfo() {
|
||||
return decorationInfo;
|
||||
}
|
||||
|
||||
/** Sets the alpha of the decorator for this item. */
|
||||
protected void setDecorationFillAlpha(int alpha) {
|
||||
if (decorationInfo == null || decorationInfo.getDecorationHandler() == null) {
|
||||
return;
|
||||
}
|
||||
decorationInfo.getDecorationHandler().setFillAlpha(alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user