Temporarily tweaking the all apps layout to fit the screen on tablets.

Change-Id: I2f8fe8e39a39cd6a055f22696881c51be7624832
This commit is contained in:
Winson Chung
2015-04-08 11:07:53 -07:00
parent adb7541648
commit bd808530db
4 changed files with 11 additions and 7 deletions

View File

@@ -18,16 +18,17 @@
android:id="@+id/apps_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#22000000"
android:padding="@dimen/apps_container_inset"
android:background="@drawable/apps_customize_bg"
android:descendantFocusability="afterDescendants">
<include
layout="@layout/apps_reveal_view"
android:layout_width="@dimen/apps_container_width"
android:layout_height="540dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
<include
layout="@layout/apps_list_view"
android:layout_width="@dimen/apps_container_width"
android:layout_height="540dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
</com.android.launcher3.AppsContainerView>

View File

@@ -18,7 +18,9 @@
<dimen name="app_icon_size">64dp</dimen>
<!-- Apps view -->
<dimen name="apps_container_width">480dp</dimen>
<dimen name="apps_container_inset">24dp</dimen>
<dimen name="apps_grid_view_start_margin">64dp</dimen>
<dimen name="apps_view_section_text_size">26sp</dimen>
<dimen name="apps_view_row_height">76dp</dimen>
<!-- AppsCustomize -->

View File

@@ -48,6 +48,7 @@
<!-- Apps view -->
<dimen name="apps_container_width">0dp</dimen>
<dimen name="apps_container_height">0dp</dimen>
<dimen name="apps_container_inset">8dp</dimen>
<dimen name="apps_grid_view_start_margin">52dp</dimen>
<dimen name="apps_view_row_height">64dp</dimen>

View File

@@ -429,7 +429,7 @@ public class DeviceProfile {
int availableAppsWidthPx = (appsContainerViewPx > 0) ? appsContainerViewPx :
availableWidthPx;
appsViewNumCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
(allAppsCellWidthPx + allAppsCellPaddingPx);
(allAppsCellWidthPx + 2 * allAppsCellPaddingPx);
}
void updateFromConfiguration(Context context, Resources resources, int wPx, int hPx,