How to display drop-down list view below specific view in Android?

I have one filter button. I need to open an extensible / popup filter as shown below. I tried the popup menu and Listpopup window, but I did not get any success.

enter image description here

thanks in advance

+4
source share
2 answers

I made the code using the comments above. but the code is as follows.

    final View popUpView = getLayoutInflater().inflate(R.layout.exp, null);
    listPopupWindow = new PopupWindow(popUpView, LinearLayout.LayoutParams.WRAP_CONTENT,
            LinearLayout.LayoutParams.WRAP_CONTENT, true);
    expandableListView= (ExpandableListView) popUpView.findViewById(R.id.expandableListView);
    btnticker.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            expandableListDetail = ExpandableListDataPump.getData();
            expandableListTitle = new ArrayList<String>(expandableListDetail.keySet());

            expandableListAdapter = new CustomExpandableListAdapter(MainActivity.this, expandableListTitle, expandableListDetail);
            expandableListView.setAdapter(expandableListAdapter);

            listPopupWindow.showAsDropDown(v);
        }
    });
0
source

, , ui, , . , ...

, carwale, .. ..

, ..

+1

Source: https://habr.com/ru/post/1680407/


All Articles