Allow remote views to be used in Tiles
If a suggeested action Tile has a remote view defined, inflate a card layout to contain the remote view, instead of showing the default title-summary layout. Additionally, if the remote view has a view with ID @android:id/primary, that will be used as the click target rather than the entire card. Test: cd tests/robotests && mma Bug: 35668836 Change-Id: I0fd1b9c637b6d7a3d7d2f6268669917408a882eb
This commit is contained in:
@@ -218,7 +218,13 @@ public class DashboardData {
|
||||
*/
|
||||
private void countSuggestion(Tile tile, boolean add) {
|
||||
if (add) {
|
||||
mItems.add(new Item(tile, R.layout.suggestion_tile, Objects.hash(tile.title), false));
|
||||
mItems.add(new Item(
|
||||
tile,
|
||||
tile.remoteViews != null
|
||||
? R.layout.suggestion_tile_card
|
||||
: R.layout.suggestion_tile,
|
||||
Objects.hash(tile.title),
|
||||
false));
|
||||
}
|
||||
mId++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user