Pop up menu

Updated at: 2023-07-21 07:44

AUPopMenu provides a pop-up menu displayed when the user taps an option card on the navigation bar, which is essentially a pop-up window.

Different from AUFloatMenu, AUPopMenu has no bottom layer mask but has menu outlines, and all menu texts are centered.

Basic features

  • Whether the menu pops upwards or downwards is controlled by the service system.

  • The string list passed by the service system shall use the default style, or pass adapter directly.

Dependency

See Quick start.

API description

/**
* The data structure. Use the default style.
* @param context
* @param itemArrayList
*/
public AUPopMenu(Context context, ArrayList<MessagePopItem> itemArrayList)

/**
* The adapter structure. Use the custom style.
* @param context
* @param listAdapter
*/
public AUPopMenu(Context context, BaseAdapter listAdapter)

/**
* tip toast down
* @param anchorView
*/
public void showTipView(View anchorView) 

/**
* tip toast with direction
* @param anchorView
* @param isDown
*/
public void showTipView(View anchorView, boolean isDown) 

/**
* Make the window disappear.
*/
public void dismiss()


/**
* Set the option tapping listener.
* @param listener
*/
public void setOnItemClickListener(AdapterView.OnItemClickListener listener)

Custom properties

No customized property is available. The XML layout is not supported.

Sample code

final AUPopMenu popMenu = new AUPopMenu(ScrollTitleBarActivity.this, getItemList());
popMenu.showTipView(view);
popMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

    }
});
  • On this page (0)
  • Basic features
  • Dependency
  • API description
  • Custom properties
  • Sample code
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare