Files
rr3-apk/decompiled-community/sources/androidx/appcompat/widget/AppCompatPopupWindow.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

70 lines
2.6 KiB
Java

package androidx.appcompat.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.PopupWindow;
import androidx.annotation.AttrRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StyleRes;
import androidx.appcompat.R;
import androidx.core.widget.PopupWindowCompat;
/* loaded from: classes.dex */
class AppCompatPopupWindow extends PopupWindow {
private static final boolean COMPAT_OVERLAP_ANCHOR = false;
private boolean mOverlapAnchor;
public AppCompatPopupWindow(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i) {
super(context, attributeSet, i);
init(context, attributeSet, i, 0);
}
public AppCompatPopupWindow(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
super(context, attributeSet, i, i2);
init(context, attributeSet, i, i2);
}
private void init(Context context, AttributeSet attributeSet, int i, int i2) {
TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(context, attributeSet, R.styleable.PopupWindow, i, i2);
if (obtainStyledAttributes.hasValue(R.styleable.PopupWindow_overlapAnchor)) {
setSupportOverlapAnchor(obtainStyledAttributes.getBoolean(R.styleable.PopupWindow_overlapAnchor, false));
}
setBackgroundDrawable(obtainStyledAttributes.getDrawable(R.styleable.PopupWindow_android_popupBackground));
obtainStyledAttributes.recycle();
}
@Override // android.widget.PopupWindow
public void showAsDropDown(View view, int i, int i2) {
if (COMPAT_OVERLAP_ANCHOR && this.mOverlapAnchor) {
i2 -= view.getHeight();
}
super.showAsDropDown(view, i, i2);
}
@Override // android.widget.PopupWindow
public void showAsDropDown(View view, int i, int i2, int i3) {
if (COMPAT_OVERLAP_ANCHOR && this.mOverlapAnchor) {
i2 -= view.getHeight();
}
super.showAsDropDown(view, i, i2, i3);
}
@Override // android.widget.PopupWindow
public void update(View view, int i, int i2, int i3, int i4) {
if (COMPAT_OVERLAP_ANCHOR && this.mOverlapAnchor) {
i2 -= view.getHeight();
}
super.update(view, i, i2, i3, i4);
}
private void setSupportOverlapAnchor(boolean z) {
if (COMPAT_OVERLAP_ANCHOR) {
this.mOverlapAnchor = z;
} else {
PopupWindowCompat.setOverlapAnchor(this, z);
}
}
}