433 lines
10 KiB
Smali
433 lines
10 KiB
Smali
.class public Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;
|
|
.super Landroidx/appcompat/widget/DropDownListView;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/appcompat/widget/MenuPopupWindow;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "MenuDropDownListView"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final mAdvanceKey:I
|
|
|
|
.field private mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
|
|
|
|
.field private mHoveredMenuItem:Landroid/view/MenuItem;
|
|
|
|
.field final mRetreatKey:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Z)V
|
|
.locals 2
|
|
|
|
.line 147
|
|
invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/DropDownListView;-><init>(Landroid/content/Context;Z)V
|
|
|
|
.line 149
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
.line 150
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
.line 151
|
|
invoke-virtual {p1}, Landroid/content/res/Configuration;->getLayoutDirection()I
|
|
|
|
move-result p1
|
|
|
|
const/16 v0, 0x15
|
|
|
|
const/16 v1, 0x16
|
|
|
|
if-ne p2, p1, :cond_0
|
|
|
|
iput v0, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mAdvanceKey:I
|
|
|
|
iput v1, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mRetreatKey:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iput v1, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mAdvanceKey:I
|
|
|
|
iput v0, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mRetreatKey:I
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public clearSelection()V
|
|
.locals 1
|
|
|
|
const/4 v0, -0x1
|
|
|
|
.line 165
|
|
invoke-virtual {p0, v0}, Landroid/widget/AdapterView;->setSelection(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic hasFocus()Z
|
|
.locals 1
|
|
|
|
.line 138
|
|
invoke-super {p0}, Landroidx/appcompat/widget/DropDownListView;->hasFocus()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic hasWindowFocus()Z
|
|
.locals 1
|
|
|
|
.line 138
|
|
invoke-super {p0}, Landroidx/appcompat/widget/DropDownListView;->hasWindowFocus()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic isFocused()Z
|
|
.locals 1
|
|
|
|
.line 138
|
|
invoke-super {p0}, Landroidx/appcompat/widget/DropDownListView;->isFocused()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic isInTouchMode()Z
|
|
.locals 1
|
|
|
|
.line 138
|
|
invoke-super {p0}, Landroidx/appcompat/widget/DropDownListView;->isInTouchMode()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic lookForSelectablePosition(IZ)I
|
|
.locals 0
|
|
|
|
.line 138
|
|
invoke-super {p0, p1, p2}, Landroidx/appcompat/widget/DropDownListView;->lookForSelectablePosition(IZ)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic measureHeightOfChildrenCompat(IIIII)I
|
|
.locals 0
|
|
|
|
.line 138
|
|
invoke-super/range {p0 .. p5}, Landroidx/appcompat/widget/DropDownListView;->measureHeightOfChildrenCompat(IIIII)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic onForwardedEvent(Landroid/view/MotionEvent;I)Z
|
|
.locals 0
|
|
|
|
.line 138
|
|
invoke-super {p0, p1, p2}, Landroidx/appcompat/widget/DropDownListView;->onForwardedEvent(Landroid/view/MotionEvent;I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onHoverEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 204
|
|
invoke-virtual {p0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
.line 205
|
|
instance-of v1, v0, Landroid/widget/HeaderViewListAdapter;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 206
|
|
check-cast v0, Landroid/widget/HeaderViewListAdapter;
|
|
|
|
.line 207
|
|
invoke-virtual {v0}, Landroid/widget/HeaderViewListAdapter;->getHeadersCount()I
|
|
|
|
move-result v1
|
|
|
|
.line 208
|
|
invoke-virtual {v0}, Landroid/widget/HeaderViewListAdapter;->getWrappedAdapter()Landroid/widget/ListAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/appcompat/view/menu/MenuAdapter;
|
|
|
|
goto :goto_0
|
|
|
|
.line 211
|
|
:cond_0
|
|
check-cast v0, Landroidx/appcompat/view/menu/MenuAdapter;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 216
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0xa
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
.line 217
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
move-result v2
|
|
|
|
float-to-int v2, v2
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
invoke-virtual {p0, v2, v3}, Landroid/widget/AbsListView;->pointToPosition(II)I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
sub-int/2addr v2, v1
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
.line 220
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuAdapter;->getCount()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v2, v1, :cond_1
|
|
|
|
.line 221
|
|
invoke-virtual {v0, v2}, Landroidx/appcompat/view/menu/MenuAdapter;->getItem(I)Landroidx/appcompat/view/menu/MenuItemImpl;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
iget-object v2, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoveredMenuItem:Landroid/view/MenuItem;
|
|
|
|
if-eq v2, v1, :cond_3
|
|
|
|
.line 228
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuAdapter;->getAdapterMenu()Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
iget-object v3, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
|
|
|
|
.line 230
|
|
invoke-interface {v3, v0, v2}, Landroidx/appcompat/widget/MenuItemHoverListener;->onItemHoverExit(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
|
|
|
|
:cond_2
|
|
iput-object v1, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoveredMenuItem:Landroid/view/MenuItem;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object v2, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
|
|
|
|
.line 236
|
|
invoke-interface {v2, v0, v1}, Landroidx/appcompat/widget/MenuItemHoverListener;->onItemHoverEnter(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)V
|
|
|
|
.line 241
|
|
:cond_3
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/DropDownListView;->onHoverEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
.locals 4
|
|
|
|
.line 170
|
|
invoke-virtual {p0}, Landroid/widget/AdapterView;->getSelectedView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/appcompat/view/menu/ListMenuItemView;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v2, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mAdvanceKey:I
|
|
|
|
if-ne p1, v2, :cond_1
|
|
|
|
.line 172
|
|
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/ListMenuItemView;->getItemData()Landroidx/appcompat/view/menu/MenuItemImpl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuItemImpl;->hasSubMenu()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 175
|
|
invoke-virtual {p0}, Landroid/widget/AdapterView;->getSelectedItemPosition()I
|
|
|
|
move-result p1
|
|
|
|
.line 176
|
|
invoke-virtual {p0}, Landroid/widget/AdapterView;->getSelectedItemId()J
|
|
|
|
move-result-wide v2
|
|
|
|
.line 173
|
|
invoke-virtual {p0, v0, p1, v2, v3}, Landroid/widget/AdapterView;->performItemClick(Landroid/view/View;IJ)Z
|
|
|
|
:cond_0
|
|
return v1
|
|
|
|
:cond_1
|
|
if-eqz v0, :cond_3
|
|
|
|
iget v0, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mRetreatKey:I
|
|
|
|
if-ne p1, v0, :cond_3
|
|
|
|
const/4 p1, -0x1
|
|
|
|
.line 180
|
|
invoke-virtual {p0, p1}, Landroid/widget/AdapterView;->setSelection(I)V
|
|
|
|
.line 183
|
|
invoke-virtual {p0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
.line 185
|
|
instance-of p2, p1, Landroid/widget/HeaderViewListAdapter;
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
.line 186
|
|
check-cast p1, Landroid/widget/HeaderViewListAdapter;
|
|
|
|
.line 187
|
|
invoke-virtual {p1}, Landroid/widget/HeaderViewListAdapter;->getWrappedAdapter()Landroid/widget/ListAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/appcompat/view/menu/MenuAdapter;
|
|
|
|
goto :goto_0
|
|
|
|
.line 189
|
|
:cond_2
|
|
check-cast p1, Landroidx/appcompat/view/menu/MenuAdapter;
|
|
|
|
.line 191
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuAdapter;->getAdapterMenu()Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/appcompat/view/menu/MenuBuilder;->close(Z)V
|
|
|
|
return v1
|
|
|
|
.line 194
|
|
:cond_3
|
|
invoke-super {p0, p1, p2}, Landroid/view/View;->onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 0
|
|
|
|
.line 138
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/DropDownListView;->onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public setHoverListener(Landroidx/appcompat/widget/MenuItemHoverListener;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/MenuPopupWindow$MenuDropDownListView;->mHoverListener:Landroidx/appcompat/widget/MenuItemHoverListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic setSelector(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 0
|
|
|
|
.line 138
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/DropDownListView;->setSelector(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|