PopupWindow二级列表展示数据

点击事件:
(接口回调)

public void search_menu() {
        PopupWindow window = new PopupWindow(view, 1080, 350, true);
        window.setBackgroundDrawable(new ColorDrawable());
        window.setTouchable(true);
        window.showAsDropDown(search_menu);
        //设置透明度
        view.getBackground().setAlpha(50);
        menu_er.getBackground().setAlpha(50);
        menu_san.getBackground().setAlpha(50);
        Toast.makeText(SearchActivity.this,"???",Toast.LENGTH_LONG).show();
    }

请求二级列表数据

				FirstCateBean firstCateBean = gson.fromJson(data, FirstCateBean.class);
	            FristAdapter fristAdapter = new 	FristAdapter(SearchActivity.this,firstCateBean);
	            menu_er.setAdapter(fristAdapter);
	            //RecyclerViewd点击事件
	            fristAdapter.setrconclick(new FristAdapter.setOnClick() {
	                @Override
	                public void onClick(int i,int id) {
	                    Toast.makeText(SearchActivity.this,id+"",Toast.LENGTH_SHORT).show();
	                    //将接口回调的id放入URL继续执行请求数据的方法
	                    firstCategoryId =id;
	                    LoadData1();
	                }
	            });

你可能感兴趣的:(PopupWindow二级列表展示数据)