Loading packages/SystemUI/res/layout/global_actions_grid_v2.xml +23 −11 Original line number Diff line number Diff line Loading @@ -12,29 +12,41 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:theme="@style/qs_theme" android:gravity="top" android:clipChildren="false" android:clipToPadding="false" android:layout_marginTop="@dimen/global_actions_top_margin" android:layout_marginLeft="@dimen/global_actions_side_margin" android:layout_marginRight="@dimen/global_actions_side_margin" > <LinearLayout android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/global_actions_side_margin" android:layout_marginRight="@dimen/global_actions_side_margin" android:paddingLeft="@dimen/global_actions_grid_horizontal_padding" android:paddingRight="@dimen/global_actions_grid_horizontal_padding" android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:orientation="horizontal" android:gravity="left" android:gravity="left | center_vertical" android:translationZ="@dimen/global_actions_translate" > <RelativeLayout android:id="@+id/global_actions_overflow_button" android:layout_width="48dp" android:layout_height="48dp" > <ImageView android:src="@drawable/ic_more_vert" android:layout_centerInParent="true" android:layout_width="24dp" android:layout_height="24dp" android:tint="@color/control_more_vert" /> </RelativeLayout> </LinearLayout> </com.android.systemui.globalactions.GlobalActionsFlatLayout> <com.android.systemui.globalactions.MinHeightScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/global_actions_grid_container_shadow_offset" Loading packages/SystemUI/res/values-land/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,7 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">4</integer> <!-- Max number of columns for power menu --> <integer name="power_menu_max_columns">4</integer> </resources> packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,10 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">2</integer> <!-- Max number of columns for power menu --> <integer name="power_menu_max_columns">3</integer> <!-- If the dp width of the available space is <= this value, potentially adjust the number of columns--> <integer name="controls_max_columns_adjust_below_width_dp">320</integer> Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +286 −66 File changed.Preview size limit exceeded, changes collapsed. Show changes packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsFlatLayout.java +20 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.R; * Flat, single-row implementation of the button layout created by the global actions dialog. */ public class GlobalActionsFlatLayout extends GlobalActionsLayout { private static final int MAX_ITEMS = 4; public GlobalActionsFlatLayout(Context context, AttributeSet attrs) { super(context, attrs); } Loading @@ -54,11 +53,28 @@ public class GlobalActionsFlatLayout extends GlobalActionsLayout { return null; } private View getOverflowButton() { return findViewById(com.android.systemui.R.id.global_actions_overflow_button); } @Override protected void addToListView(View v, boolean reverse) { // only add items to the list view if we haven't hit our max yet if (getListView().getChildCount() < MAX_ITEMS) { super.addToListView(v, reverse); View overflowButton = getOverflowButton(); // if there's an overflow button, make sure it stays at the end if (overflowButton != null) { getListView().removeView(overflowButton); super.addToListView(overflowButton, reverse); } } @Override protected void removeAllListViews() { View overflowButton = getOverflowButton(); super.removeAllListViews(); // if there's an overflow button, add it back after clearing the list views if (overflowButton != null) { super.addToListView(overflowButton, false); } } Loading Loading
packages/SystemUI/res/layout/global_actions_grid_v2.xml +23 −11 Original line number Diff line number Diff line Loading @@ -12,29 +12,41 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:theme="@style/qs_theme" android:gravity="top" android:clipChildren="false" android:clipToPadding="false" android:layout_marginTop="@dimen/global_actions_top_margin" android:layout_marginLeft="@dimen/global_actions_side_margin" android:layout_marginRight="@dimen/global_actions_side_margin" > <LinearLayout android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/global_actions_side_margin" android:layout_marginRight="@dimen/global_actions_side_margin" android:paddingLeft="@dimen/global_actions_grid_horizontal_padding" android:paddingRight="@dimen/global_actions_grid_horizontal_padding" android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:orientation="horizontal" android:gravity="left" android:gravity="left | center_vertical" android:translationZ="@dimen/global_actions_translate" > <RelativeLayout android:id="@+id/global_actions_overflow_button" android:layout_width="48dp" android:layout_height="48dp" > <ImageView android:src="@drawable/ic_more_vert" android:layout_centerInParent="true" android:layout_width="24dp" android:layout_height="24dp" android:tint="@color/control_more_vert" /> </RelativeLayout> </LinearLayout> </com.android.systemui.globalactions.GlobalActionsFlatLayout> <com.android.systemui.globalactions.MinHeightScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/global_actions_grid_container_shadow_offset" Loading
packages/SystemUI/res/values-land/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,7 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">4</integer> <!-- Max number of columns for power menu --> <integer name="power_menu_max_columns">4</integer> </resources>
packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,10 @@ <!-- Max number of columns for quick controls area --> <integer name="controls_max_columns">2</integer> <!-- Max number of columns for power menu --> <integer name="power_menu_max_columns">3</integer> <!-- If the dp width of the available space is <= this value, potentially adjust the number of columns--> <integer name="controls_max_columns_adjust_below_width_dp">320</integer> Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +286 −66 File changed.Preview size limit exceeded, changes collapsed. Show changes
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsFlatLayout.java +20 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.R; * Flat, single-row implementation of the button layout created by the global actions dialog. */ public class GlobalActionsFlatLayout extends GlobalActionsLayout { private static final int MAX_ITEMS = 4; public GlobalActionsFlatLayout(Context context, AttributeSet attrs) { super(context, attrs); } Loading @@ -54,11 +53,28 @@ public class GlobalActionsFlatLayout extends GlobalActionsLayout { return null; } private View getOverflowButton() { return findViewById(com.android.systemui.R.id.global_actions_overflow_button); } @Override protected void addToListView(View v, boolean reverse) { // only add items to the list view if we haven't hit our max yet if (getListView().getChildCount() < MAX_ITEMS) { super.addToListView(v, reverse); View overflowButton = getOverflowButton(); // if there's an overflow button, make sure it stays at the end if (overflowButton != null) { getListView().removeView(overflowButton); super.addToListView(overflowButton, reverse); } } @Override protected void removeAllListViews() { View overflowButton = getOverflowButton(); super.removeAllListViews(); // if there's an overflow button, add it back after clearing the list views if (overflowButton != null) { super.addToListView(overflowButton, false); } } Loading