summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/layout/breadcrumbs_in_fragment_material.xml22
-rw-r--r--graphics/java/android/graphics/drawable/ColorDrawable.java7
-rw-r--r--graphics/java/android/graphics/drawable/Drawable.java2
3 files changed, 30 insertions, 1 deletions
diff --git a/core/res/res/layout/breadcrumbs_in_fragment_material.xml b/core/res/res/layout/breadcrumbs_in_fragment_material.xml
new file mode 100644
index 000000000000..96c0144e3a50
--- /dev/null
+++ b/core/res/res/layout/breadcrumbs_in_fragment_material.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<!-- This layout disables breadcrumbs in the fragment area and causes PreferenceActivity to
+ put the breadcrumbs in the action bar. -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="0dip"
+ android:layout_height="0dip"
+ android:visibility="gone" />
diff --git a/graphics/java/android/graphics/drawable/ColorDrawable.java b/graphics/java/android/graphics/drawable/ColorDrawable.java
index 33225ce36bff..0608065c7153 100644
--- a/graphics/java/android/graphics/drawable/ColorDrawable.java
+++ b/graphics/java/android/graphics/drawable/ColorDrawable.java
@@ -16,6 +16,7 @@
package android.graphics.drawable;
+import android.annotation.NonNull;
import android.graphics.*;
import android.graphics.PorterDuff.Mode;
import android.content.res.ColorStateList;
@@ -211,6 +212,12 @@ public class ColorDrawable extends Drawable {
}
@Override
+ public void getOutline(@NonNull Outline outline) {
+ outline.setRect(getBounds());
+ outline.setAlpha(getAlpha() / 255.0f);
+ }
+
+ @Override
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException {
super.inflate(r, parser, attrs, theme);
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 43a9eaa17add..9ae788cf6c90 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -895,7 +895,7 @@ public abstract class Drawable {
*/
public void getOutline(@NonNull Outline outline) {
outline.setRect(getBounds());
- outline.setAlpha(getAlpha() / 255.0f);
+ outline.setAlpha(0);
}
/**