Files
rr3-apk/decompiled/sources/androidx/appcompat/widget/ThemedSpinnerAdapter.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

54 lines
1.8 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.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.view.ContextThemeWrapper;
/* loaded from: classes.dex */
public interface ThemedSpinnerAdapter extends SpinnerAdapter {
@Nullable
Resources.Theme getDropDownViewTheme();
void setDropDownViewTheme(@Nullable Resources.Theme theme);
public static final class Helper {
private final Context mContext;
private LayoutInflater mDropDownInflater;
private final LayoutInflater mInflater;
@NonNull
public LayoutInflater getDropDownViewInflater() {
LayoutInflater layoutInflater = this.mDropDownInflater;
return layoutInflater != null ? layoutInflater : this.mInflater;
}
public Helper(@NonNull Context context) {
this.mContext = context;
this.mInflater = LayoutInflater.from(context);
}
public void setDropDownViewTheme(@Nullable 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));
}
}
@Nullable
public Resources.Theme getDropDownViewTheme() {
LayoutInflater layoutInflater = this.mDropDownInflater;
if (layoutInflater == null) {
return null;
}
return layoutInflater.getContext().getTheme();
}
}
}