Update suggestion card width.

- instead of using hard-coded width for 1 or 2 cards, they should take
up the whole screen width minus the defined padding, so that when the
device is in landscape mode, they look better.

Change-Id: Ic6485c858c7742a154a6d9b05fff180f161be323
Fixes: 72850225
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-02-05 17:55:16 -08:00
parent 3ded640895
commit c627161ca6
5 changed files with 84 additions and 15 deletions

View File

@@ -35,6 +35,7 @@ import android.support.v7.widget.RecyclerView;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import com.android.settings.R;
@@ -77,6 +78,8 @@ public class DashboardAdapterTest {
private Condition mCondition;
@Mock
private Resources mResources;
@Mock
private WindowManager mWindowManager;
private FakeFeatureFactory mFactory;
private DashboardAdapter mDashboardAdapter;
private List<Condition> mConditionList;
@@ -87,6 +90,7 @@ public class DashboardAdapterTest {
mFactory = FakeFeatureFactory.setupForTest();
when(mFactory.dashboardFeatureProvider.shouldTintIcon()).thenReturn(true);
when(mContext.getSystemService(Context.WINDOW_SERVICE)).thenReturn(mWindowManager);
when(mContext.getResources()).thenReturn(mResources);
when(mResources.getQuantityString(any(int.class), any(int.class), any()))
.thenReturn("");