BottomNavigationMenu.java
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package android.support.design.internal;
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v7.view.menu.MenuBuilder;
import android.support.v7.view.menu.MenuItemImpl;
import android.view.MenuItem;
import android.view.SubMenu;
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public final class BottomNavigationMenu
extends MenuBuilder
{
public static final int MAX_ITEM_COUNT = 5;
public BottomNavigationMenu(Context paramContext)
{
super(paramContext);
}
protected final MenuItem addInternal(int paramInt1, int paramInt2, int paramInt3, CharSequence paramCharSequence)
{
if (size() + 1 > 5) {
throw new IllegalArgumentException("Maximum number of items supported by BottomNavigationView is 5. Limit can be checked with BottomNavigationView#getMaxItemCount()");
}
stopDispatchingItemsChanged();
paramCharSequence = super.addInternal(paramInt1, paramInt2, paramInt3, paramCharSequence);
if ((paramCharSequence instanceof MenuItemImpl)) {
((MenuItemImpl)paramCharSequence).setExclusiveCheckable(true);
}
startDispatchingItemsChanged();
return paramCharSequence;
}
public final SubMenu addSubMenu(int paramInt1, int paramInt2, int paramInt3, CharSequence paramCharSequence)
{
throw new UnsupportedOperationException("BottomNavigationView does not support submenus");
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/design/internal/BottomNavigationMenu.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/