<!-- Extends LinearLayout -->
<com.android.systemui.qs.QSDetail
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/qs_detail_background"
android:background="@color/qs_detail_progress_track"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- systemui:hasOverlappingRendering="false"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- systemui:hasOverlappingRendering="false"
/>
<TextView
<!-- extends LinearLayout -->
<com.android.systemui.statusbar.SignalClusterView
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:gravity="center_vertical"
android:id="@+id/ethernet"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:theme="@style/DualToneDarkTheme"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:alpha="0.0"
- systemui:hasOverlappingRendering="false"
/>
</FrameLayout>
<FrameLayout
android:id="@+id/wifi_signal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:theme="@style/DualToneDarkTheme"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:alpha="0.0"
- systemui:hasOverlappingRendering="false"
/>
</FrameLayout>
<View
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/stat_sys_no_sims"
- systemui:hasOverlappingRendering="false"
/>
<com.android.systemui.statusbar.AlphaOptimizedImageView
android:theme="@style/DualToneDarkTheme"
android:layout_width="wrap_content"
android:src="@drawable/stat_sys_no_sims"
android:alpha="0.0"
- systemui:hasOverlappingRendering="false"
/>
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- systemui:hasOverlappingRendering="false"
/>
<TextView
<attr name="ignoreRightInset" format="boolean" />
</declare-styleable>
- <declare-styleable name="AlphaOptimizedImageView">
+ <declare-styleable name="AnimatedImageView">
<attr name="hasOverlappingRendering" format="boolean" />
</declare-styleable>
package com.android.systemui.statusbar;
import android.content.Context;
-import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
-import com.android.systemui.R;
-
/**
* An ImageView which supports an attribute specifying whether it has overlapping rendering
* commands and therefore does not need a layer when alpha is changed.
*/
public class AlphaOptimizedImageView extends ImageView {
- private final boolean mHasOverlappingRendering;
public AlphaOptimizedImageView(Context context) {
this(context, null /* attrs */);
public AlphaOptimizedImageView(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
-
- TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
- R.styleable.AlphaOptimizedImageView, 0, 0);
-
- try {
- // Default to true, which is what View.java defaults to
- mHasOverlappingRendering = a.getBoolean(
- R.styleable.AlphaOptimizedImageView_hasOverlappingRendering, true);
- } finally {
- a.recycle();
- }
}
@Override
public boolean hasOverlappingRendering() {
- return mHasOverlappingRendering;
+ return false;
}
}
package com.android.systemui.statusbar;
import android.content.Context;
+import android.content.res.TypedArray;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
+import android.widget.ImageView;
import android.widget.RemoteViews.RemoteView;
+import com.android.systemui.R;
+
@RemoteView
-public class AnimatedImageView extends AlphaOptimizedImageView {
+public class AnimatedImageView extends ImageView {
+ private final boolean mHasOverlappingRendering;
AnimationDrawable mAnim;
boolean mAttached;
int mDrawableId;
public AnimatedImageView(Context context) {
- super(context);
+ this(context, null);
}
public AnimatedImageView(Context context, AttributeSet attrs) {
super(context, attrs);
+ TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
+ R.styleable.AnimatedImageView, 0, 0);
+
+ try {
+ // Default to true, which is what View.java defaults toA
+ mHasOverlappingRendering = a.getBoolean(
+ R.styleable.AnimatedImageView_hasOverlappingRendering, true);
+ } finally {
+ a.recycle();
+ }
}
private void updateAnim() {
}
}
}
+
+ @Override
+ public boolean hasOverlappingRendering() {
+ return mHasOverlappingRendering;
+ }
}