mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 09:57:16 +01:00
81 lines
2.6 KiB
Java
81 lines
2.6 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.graphics.Canvas;
|
|
import android.graphics.ColorFilter;
|
|
import android.graphics.Outline;
|
|
import android.graphics.drawable.Drawable;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.RequiresApi;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
class ActionBarBackgroundDrawable extends Drawable {
|
|
final ActionBarContainer mContainer;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@RequiresApi(21)
|
|
public static class Api21Impl {
|
|
private Api21Impl() {
|
|
}
|
|
|
|
public static void getOutline(Drawable drawable, Outline outline) {
|
|
drawable.getOutline(outline);
|
|
}
|
|
}
|
|
|
|
public ActionBarBackgroundDrawable(ActionBarContainer actionBarContainer) {
|
|
this.mContainer = actionBarContainer;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public void draw(@NonNull Canvas canvas) {
|
|
ActionBarContainer actionBarContainer = this.mContainer;
|
|
if (actionBarContainer.mIsSplit) {
|
|
Drawable drawable = actionBarContainer.mSplitBackground;
|
|
if (drawable != null) {
|
|
drawable.draw(canvas);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
Drawable drawable2 = actionBarContainer.mBackground;
|
|
if (drawable2 != null) {
|
|
drawable2.draw(canvas);
|
|
}
|
|
ActionBarContainer actionBarContainer2 = this.mContainer;
|
|
Drawable drawable3 = actionBarContainer2.mStackedBackground;
|
|
if (drawable3 == null || !actionBarContainer2.mIsStacked) {
|
|
return;
|
|
}
|
|
drawable3.draw(canvas);
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public int getOpacity() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
@RequiresApi(21)
|
|
public void getOutline(@NonNull Outline outline) {
|
|
ActionBarContainer actionBarContainer = this.mContainer;
|
|
if (actionBarContainer.mIsSplit) {
|
|
if (actionBarContainer.mSplitBackground != null) {
|
|
Api21Impl.getOutline(actionBarContainer.mBackground, outline);
|
|
}
|
|
} else {
|
|
Drawable drawable = actionBarContainer.mBackground;
|
|
if (drawable != null) {
|
|
Api21Impl.getOutline(drawable, outline);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public void setAlpha(int i) {
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public void setColorFilter(ColorFilter colorFilter) {
|
|
}
|
|
}
|