mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Have a recycler view to show search results.
-Have a recycler view layout for search widgets list. -Make WidgetsFullSheet implement interface- SearchModeListener to get notified when user is using search and also when search results are ready. -Have a WidgetsListSearchHeaderViewHolderBinder for search result headers which shows subtext in header as concatenated string of widget/shortcut labels. -Modify WidgetsListAdapter and WidgetsDiffReporter to work well with search recycler view. Test: Tested prototype locally. Also added robolectric test. Bug: b/157286785 Change-Id: Ie29d9f295fddb6d727b5fc26a360f514f2f4a763
This commit is contained in:
@@ -51,10 +51,11 @@ public abstract class WidgetsListBaseEntry {
|
||||
public abstract int getRank();
|
||||
|
||||
@Retention(SOURCE)
|
||||
@IntDef({RANK_WIDGETS_LIST_HEADER, RANK_WIDGETS_LIST_CONTENT})
|
||||
@IntDef({RANK_WIDGETS_LIST_HEADER, RANK_WIDGETS_LIST_SEARCH_HEADER, RANK_WIDGETS_LIST_CONTENT})
|
||||
public @interface Rank {
|
||||
}
|
||||
|
||||
public static final int RANK_WIDGETS_LIST_HEADER = 1;
|
||||
public static final int RANK_WIDGETS_LIST_CONTENT = 2;
|
||||
public static final int RANK_WIDGETS_LIST_SEARCH_HEADER = 2;
|
||||
public static final int RANK_WIDGETS_LIST_CONTENT = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user