| | |
| | | import android.content.Context; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.widget.PopupWindow; |
| | | |
| | | import com.duqing.missions.base.fragments.BaseLoadPageFragment; |
| | | import com.duqing.missions.data.BasePageResult; |
| | |
| | | */ |
| | | public class SubHallFragment extends BaseLoadPageFragment<FragmentSubHallBinding,SubHallViewModel, MissionAdapter, BasePageResult<String>> { |
| | | |
| | | |
| | | @Override |
| | | public void initViews() { |
| | | super.initViews(); |
| | | final PopupClassify popupClassify = new PopupClassify(getContext(), HallPopuClassifyBinding.inflate((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE))); |
| | | popupClassify.setOnDismissListener(new PopupWindow.OnDismissListener() { |
| | | @Override |
| | | public void onDismiss() { |
| | | smartRefresh.autoRefresh(); |
| | | } |
| | | }); |
| | | binding.txtClassify.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | new PopupClassify(getContext(), HallPopuClassifyBinding.inflate((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE))).showAsDropDown(v); |
| | | if(popupClassify.isShowing()){ |
| | | popupClassify.dismiss(); |
| | | }else { |
| | | popupClassify.showAsDropDown(v); |
| | | } |
| | | } |
| | | }); |
| | | } |