97 lines
2.4 KiB
Smali
97 lines
2.4 KiB
Smali
.class public final Lcom/google/android/material/bottomnavigation/BottomNavigationMenu;
|
|
.super Landroidx/appcompat/view/menu/d;
|
|
.source "BottomNavigationMenu.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final MAX_ITEM_COUNT:I = 0x5
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Landroidx/appcompat/view/menu/d;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public addInternal(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroidx/appcompat/view/menu/d;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
const/4 v2, 0x5
|
|
|
|
if-gt v0, v2, :cond_1
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroidx/appcompat/view/menu/d;->stopDispatchingItemsChanged()V
|
|
|
|
.line 3
|
|
invoke-super {p0, p1, p2, p3, p4}, Landroidx/appcompat/view/menu/d;->addInternal(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;
|
|
|
|
move-result-object p1
|
|
|
|
.line 4
|
|
instance-of p2, p1, Landroidx/appcompat/view/menu/g;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 5
|
|
move-object p2, p1
|
|
|
|
check-cast p2, Landroidx/appcompat/view/menu/g;
|
|
|
|
invoke-virtual {p2, v1}, Landroidx/appcompat/view/menu/g;->w(Z)V
|
|
|
|
.line 6
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroidx/appcompat/view/menu/d;->startDispatchingItemsChanged()V
|
|
|
|
return-object p1
|
|
|
|
.line 7
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Maximum number of items supported by BottomNavigationView is 5. Limit can be checked with BottomNavigationView#getMaxItemCount()"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public addSubMenu(IIILjava/lang/CharSequence;)Landroid/view/SubMenu;
|
|
.locals 0
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string p2, "BottomNavigationView does not support submenus"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|