Merge "Remove "See more" from wifi/bluetooth slices"

This commit is contained in:
TreeHugger Robot
2018-11-01 21:59:45 +00:00
committed by Android (Google) Code Review
6 changed files with 10 additions and 30 deletions

View File

@@ -95,8 +95,6 @@ public class ConnectedDeviceSlice implements CustomSliceable {
private static final Comparator<CachedBluetoothDevice> COMPARATOR
= Comparator.naturalOrder();
private static final int DEFAULT_EXPANDED_ROW_COUNT = 4;
private static final String TAG = "ConnectedDeviceSlice";
private final Context mContext;
@@ -162,13 +160,6 @@ public class ConnectedDeviceSlice implements CustomSliceable {
for (ListBuilder.RowBuilder rowBuilder : rows) {
listBuilder.addRow(rowBuilder);
}
// Only show "see more" button when the number of data row is more than or equal to 4.
// TODO(b/118465996): SHOW MORE button won't work properly when having two data rows
if (rows.size() >= DEFAULT_EXPANDED_ROW_COUNT) {
listBuilder.setSeeMoreAction(primaryActionIntent);
}
return listBuilder.build();
}

View File

@@ -71,7 +71,7 @@ public class WifiSlice implements CustomSliceable {
.build();
@VisibleForTesting
static final int DEFAULT_EXPANDED_ROW_COUNT = 4;
static final int DEFAULT_EXPANDED_ROW_COUNT = 3;
private final Context mContext;
@@ -137,10 +137,7 @@ public class WifiSlice implements CustomSliceable {
.setSubtitle(placeholder));
}
}
// Add more button
return listBuilder
.setSeeMoreAction(primaryAction)
.build();
return listBuilder.build();
}
private RowBuilder getAccessPointRow(AccessPoint accessPoint) {