Output switcher panel requires large title icon for Slice slider style
-Add "VIEW_TYPE_SLIDER_LARGE_ICON" to be a new panel type which would enlarge its title icon -Set "VIEW_TYPE_SLIDER_LARGE_ICON" to MediaOutputPanel and MediaOutputGroupPanel -Extend slider style and add customized icon size -Add test cases Bug: 157208551 Test: make -j42 RunSettingsRoboTests Change-Id: I9b4de4aa552e8b26e766411f7eff93ea1a2d1910
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.panel;
|
||||
|
||||
import static com.android.settings.panel.PanelContent.VIEW_TYPE_SLIDER;
|
||||
import static com.android.settings.panel.PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
|
||||
import static com.android.settings.panel.PanelSlicesAdapter.MAX_NUM_OF_SLICES;
|
||||
import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_GROUP_SLICE_URI;
|
||||
import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_INDICATOR_SLICE_URI;
|
||||
@@ -206,6 +207,19 @@ public class PanelSlicesAdapterTest {
|
||||
assertThat(intArgumentCaptor.getValue()).isEqualTo(R.layout.panel_slice_slider_row);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onCreateViewHolder_viewTypeSliderLargeIcon_verifyLayout() {
|
||||
final PanelSlicesAdapter adapter = new PanelSlicesAdapter(mPanelFragment, mData, 0);
|
||||
final ViewGroup view = new FrameLayout(mContext);
|
||||
final ArgumentCaptor<Integer> intArgumentCaptor = ArgumentCaptor.forClass(Integer.class);
|
||||
|
||||
adapter.onCreateViewHolder(view, VIEW_TYPE_SLIDER_LARGE_ICON);
|
||||
|
||||
verify(sLayoutInflater).inflate(intArgumentCaptor.capture(), eq(view), eq(false));
|
||||
assertThat(intArgumentCaptor.getValue()).isEqualTo(
|
||||
R.layout.panel_slice_slider_row_large_icon);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onCreateViewHolder_viewTypeDefault_verifyLayout() {
|
||||
final PanelSlicesAdapter adapter =
|
||||
|
Reference in New Issue
Block a user