mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
49 lines
1.7 KiB
Java
49 lines
1.7 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.Resources;
|
|
import android.view.LayoutInflater;
|
|
import android.widget.SpinnerAdapter;
|
|
import androidx.appcompat.view.ContextThemeWrapper;
|
|
|
|
/* loaded from: classes.dex */
|
|
public interface ThemedSpinnerAdapter extends SpinnerAdapter {
|
|
Resources.Theme getDropDownViewTheme();
|
|
|
|
void setDropDownViewTheme(Resources.Theme theme);
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class Helper {
|
|
private final Context mContext;
|
|
private LayoutInflater mDropDownInflater;
|
|
private final LayoutInflater mInflater;
|
|
|
|
public LayoutInflater getDropDownViewInflater() {
|
|
LayoutInflater layoutInflater = this.mDropDownInflater;
|
|
return layoutInflater != null ? layoutInflater : this.mInflater;
|
|
}
|
|
|
|
public Helper(Context context) {
|
|
this.mContext = context;
|
|
this.mInflater = LayoutInflater.from(context);
|
|
}
|
|
|
|
public void setDropDownViewTheme(Resources.Theme theme) {
|
|
if (theme == null) {
|
|
this.mDropDownInflater = null;
|
|
} else if (theme.equals(this.mContext.getTheme())) {
|
|
this.mDropDownInflater = this.mInflater;
|
|
} else {
|
|
this.mDropDownInflater = LayoutInflater.from(new ContextThemeWrapper(this.mContext, theme));
|
|
}
|
|
}
|
|
|
|
public Resources.Theme getDropDownViewTheme() {
|
|
LayoutInflater layoutInflater = this.mDropDownInflater;
|
|
if (layoutInflater == null) {
|
|
return null;
|
|
}
|
|
return layoutInflater.getContext().getTheme();
|
|
}
|
|
}
|
|
}
|