86 lines
2.4 KiB
Smali
86 lines
2.4 KiB
Smali
.class public final Lcom/google/android/material/bottomnavigation/BottomNavigationMenu;
|
|
.super Landroidx/appcompat/view/menu/MenuBuilder;
|
|
.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
|
|
|
|
invoke-direct {p0, p1}, Landroidx/appcompat/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final addInternal(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;
|
|
.locals 3
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/bottomnavigation/BottomNavigationMenu;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
const/4 v2, 0x5
|
|
|
|
if-gt v0, v2, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/bottomnavigation/BottomNavigationMenu;->stopDispatchingItemsChanged()V
|
|
|
|
invoke-super {p0, p1, p2, p3, p4}, Landroidx/appcompat/view/menu/MenuBuilder;->addInternal(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of p2, p1, Landroidx/appcompat/view/menu/MenuItemImpl;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
move-object p2, p1
|
|
|
|
check-cast p2, Landroidx/appcompat/view/menu/MenuItemImpl;
|
|
|
|
invoke-virtual {p2, v1}, Landroidx/appcompat/view/menu/MenuItemImpl;->setExclusiveCheckable(Z)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/android/material/bottomnavigation/BottomNavigationMenu;->startDispatchingItemsChanged()V
|
|
|
|
return-object p1
|
|
|
|
: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 final addSubMenu(IIILjava/lang/CharSequence;)Landroid/view/SubMenu;
|
|
.locals 0
|
|
|
|
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
|