首页 > 代码库 > Android PopuWindow 导航链级筛选
Android PopuWindow 导航链级筛选
效果图:
代码
PopuWindowWidget
package com.example.checklistview; import android.annotation.SuppressLint; import android.content.Context; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.PopupWindow; @SuppressLint("ViewConstructor") public class PopuWindowWidget{ private static PopuWindowWidget popuWindow=null; private Context context; public PopuWindowWidget(Context context){ this.context=context; } public static PopuWindowWidget getInstance(Context context){ if(popuWindow==null){ popuWindow=new PopuWindowWidget(context); } return popuWindow; } public void onCreatePopuWindow(View view,PopuWindowListener listener){ PopupWindow pop=new PopupWindow(view,LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT); pop.setOutsideTouchable(false); pop.setFocusable(false); pop.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.background_trans)); listener.initialization(pop); } }
package com.example.checklistview; import android.widget.PopupWindow; public interface PopuWindowListener{ void isShow(boolean isShow,String message); void initialization(PopupWindow popuWindow); void onClickItem(Object obj); }
PopuWindowView:
package com.example.checklistview; import java.util.ArrayList; import java.util.HashMap; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import com.example.checklistview.CheckAdapter.NameOnClickListener; public class PopuWindowView implements NameOnClickListener{ private static PopuWindowListener listener; private View view; private Activity activity; private TextView tv; private ListView listView_bar; private ListView listView_data; private ArrayList<CheckBean> data=http://www.mamicode.com/null;>
资源下载地址:http://download.csdn.net/detail/anddroid_lanyan/8229077
Android PopuWindow 导航链级筛选
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。