Reodering some drawables
> quantum_panel_shape is xml rectangle with no margin
> quantum_panel_bitmap is 9-patch drawable with inbuild shadow and margin
> quantum_panel uses xml-shape for lollipop and 9-patch image for lower
devices. It includes margin. For shadow, use elevation on lollipop
> All drawables have _dark variant
> Using #f5f5f5 for panel background, instead of #ffffff
Change-Id: Ia7c6cea6d514ee3774fcf5fef6139650bdd53208
|
Before Width: | Height: | Size: 744 B |
BIN
res/drawable-hdpi/quantum_panel_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 646 B |
BIN
res/drawable-hdpi/quantum_panel_dark_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 629 B |
|
Before Width: | Height: | Size: 476 B |
BIN
res/drawable-mdpi/quantum_panel_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 449 B |
BIN
res/drawable-mdpi/quantum_panel_dark_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 445 B |
22
res/drawable-v21/quantum_panel.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/quantum_panel_shape"
|
||||
android:insetBottom="@dimen/quantum_panel_outer_padding"
|
||||
android:insetLeft="@dimen/quantum_panel_outer_padding"
|
||||
android:insetRight="@dimen/quantum_panel_outer_padding"
|
||||
android:insetTop="@dimen/quantum_panel_outer_padding" />
|
||||
22
res/drawable-v21/quantum_panel_dark.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/quantum_panel_shape_dark"
|
||||
android:insetBottom="@dimen/quantum_panel_outer_padding"
|
||||
android:insetLeft="@dimen/quantum_panel_outer_padding"
|
||||
android:insetRight="@dimen/quantum_panel_outer_padding"
|
||||
android:insetTop="@dimen/quantum_panel_outer_padding" />
|
||||
|
Before Width: | Height: | Size: 928 B |
BIN
res/drawable-xhdpi/quantum_panel_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 894 B |
BIN
res/drawable-xhdpi/quantum_panel_dark_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
res/drawable-xxhdpi/quantum_panel_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
res/drawable-xxhdpi/quantum_panel_dark_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
res/drawable-xxxhdpi/quantum_panel_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
res/drawable-xxxhdpi/quantum_panel_dark_bitmap.9.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
@@ -16,7 +16,7 @@
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffffff" />
|
||||
<solid android:color="@color/quantum_panel_bg_color" />
|
||||
<corners
|
||||
android:bottomLeftRadius="2dp"
|
||||
android:bottomRightRadius="2dp" />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffffff" />
|
||||
<solid android:color="@color/quantum_panel_bg_color" />
|
||||
<corners
|
||||
android:topLeftRadius="2dp"
|
||||
android:topRightRadius="2dp" />
|
||||
|
||||
18
res/drawable/quantum_panel.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/quantum_panel_bitmap" />
|
||||
18
res/drawable/quantum_panel_dark.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/quantum_panel_dark_bitmap" />
|
||||
@@ -16,7 +16,7 @@
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffffff" />
|
||||
<solid android:color="@color/quantum_panel_bg_color" />
|
||||
<corners
|
||||
android:radius="2dp" />
|
||||
</shape>
|
||||
@@ -16,6 +16,7 @@
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffffff" />
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/quantum_panel_bg_color_dark" />
|
||||
<corners
|
||||
android:radius="2dp" />
|
||||
</shape>
|
||||
@@ -14,11 +14,11 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.launcher3.Folder xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:launcher="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/quantum_panel"
|
||||
android:elevation="5dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
|
||||
@@ -30,15 +30,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:focusable="false" />
|
||||
android:elevation="15dp"
|
||||
android:focusable="false"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/widgets_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:orientation="vertical">
|
||||
android:elevation="15dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<com.android.launcher3.widget.WidgetsContainerRecyclerView
|
||||
android:id="@+id/widgets_list_view"
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
<color name="workspace_icon_text_color">#FFF</color>
|
||||
|
||||
<color name="quantum_panel_text_color">#FF666666</color>
|
||||
<color name="quantum_panel_bg_color">#FFF5F5F5</color>
|
||||
<color name="quantum_panel_bg_color_dark">#FF243036</color>
|
||||
|
||||
<color name="outline_color">#FFFFFFFF</color>
|
||||
<color name="widget_text_panel">#FF374248</color>
|
||||
|
||||
@@ -39,7 +42,7 @@
|
||||
<color name="apps_view_scrollbar_thumb_color">#009688</color>
|
||||
<color name="apps_view_section_text_color">#009688</color>
|
||||
|
||||
<!-- Widgetss view -->
|
||||
<!-- Widgets view -->
|
||||
<color name="widgets_view_section_text_color">#FFFFFF</color>
|
||||
<color name="widgets_view_item_text_color">#C4C4C4</color>
|
||||
<color name="widgets_cell_color">#263238</color>
|
||||
|
||||
@@ -103,11 +103,13 @@
|
||||
<dimen name="shortcut_preview_padding_right">0dp</dimen>
|
||||
<dimen name="shortcut_preview_padding_top">0dp</dimen>
|
||||
|
||||
<!-- Theme -->
|
||||
<dimen name="quantum_panel_outer_padding">4dp</dimen>
|
||||
|
||||
<!-- Folders -->
|
||||
<!-- The amount that the preview contents are inset from the preview background -->
|
||||
<dimen name="folder_preview_padding">4dp</dimen>
|
||||
<dimen name="folder_name_padding">10dp</dimen>
|
||||
<dimen name="folder_shadow_padding">8dp</dimen>
|
||||
|
||||
<!-- Sizes for managed profile badges -->
|
||||
<dimen name="profile_badge_size">24dp</dimen>
|
||||
|
||||
@@ -35,6 +35,7 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
import java.util.List;
|
||||
@@ -380,12 +381,13 @@ public class AppsContainerView extends BaseContainerView implements DragSource,
|
||||
|
||||
// Update the background of the reveal view and list to be inset with the fixed bound
|
||||
// insets instead of the default insets
|
||||
// TODO: Use quantum_panel instead of quantum_panel_shape.
|
||||
mAppsRecyclerView.setBackground(new InsetDrawable(
|
||||
getContext().getResources().getDrawable(
|
||||
hasSearchBar ? R.drawable.apps_list_search_bg : R.drawable.apps_list_bg),
|
||||
hasSearchBar ? R.drawable.apps_list_search_bg : R.drawable.quantum_panel_shape),
|
||||
inset, 0, inset, 0));
|
||||
getRevealView().setBackground(new InsetDrawable(
|
||||
getContext().getResources().getDrawable(R.drawable.apps_reveal_bg),
|
||||
getContext().getResources().getDrawable(R.drawable.quantum_panel_shape),
|
||||
inset, 0, inset, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import android.content.res.Resources;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.InsetDrawable;
|
||||
import android.os.Build;
|
||||
import android.text.InputType;
|
||||
import android.text.Selection;
|
||||
@@ -183,15 +182,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
||||
// name is complete, we have something to focus on, thus hiding the cursor and giving
|
||||
// reliable behavior when clicking the text field (since it will always gain focus on click).
|
||||
setFocusableInTouchMode(true);
|
||||
|
||||
if (Utilities.isLmpOrAbove()) {
|
||||
int padding = getResources().getDimensionPixelSize(R.dimen.folder_shadow_padding);
|
||||
setBackground(new InsetDrawable(
|
||||
getResources().getDrawable(R.drawable.apps_list_bg),
|
||||
padding, padding, padding, padding));
|
||||
} else {
|
||||
setBackgroundResource(R.drawable.quantum_panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||