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:
1 parent
24a63bacd6
commit
334e65935b
21 files changed
+698
-68
No files matched your search
@@ -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