This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* 下拉菜单类,用于创建和管理弹出式菜单。
*/
public class DropdownMenu {
// 下拉按钮
private Button mButton;
// 弹出式菜单
private PopupMenu mPopupMenu;
// 菜单项
private Menu mMenu;
/**
* 构造函数。
* @param context 上下文对象,用于获取资源和创建菜单。
* @param button 显示下拉菜单的按钮。
* @param menuId 要加载的菜单资源ID。
*/
public DropdownMenu(Context context, Button button, int menuId) {