|
|
@ -91,12 +91,15 @@ public class PopupMenuLifecycle extends PopupMenu implements LifecycleObserver {
|
|
|
|
insertIcon(context, item);
|
|
|
|
insertIcon(context, item);
|
|
|
|
if (item.hasSubMenu()) {
|
|
|
|
if (item.hasSubMenu()) {
|
|
|
|
SubMenu sub = item.getSubMenu();
|
|
|
|
SubMenu sub = item.getSubMenu();
|
|
|
|
sub.setHeaderTitle(title);
|
|
|
|
boolean has = false;
|
|
|
|
for (int j = 0; j < sub.size(); j++)
|
|
|
|
for (int j = 0; j < sub.size(); j++)
|
|
|
|
if (sub.getItem(j).getIcon() != null) {
|
|
|
|
if (sub.getItem(j).getIcon() != null) {
|
|
|
|
|
|
|
|
has = true;
|
|
|
|
insertIcons(context, sub);
|
|
|
|
insertIcons(context, sub);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (has)
|
|
|
|
|
|
|
|
sub.setHeaderTitle(title);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|