zoukankan      html  css  js  c++  java
  • PopupWindow-----点击弹出 PopupWindow 初始化菜单

        /**
         * 点击弹出 PopupWindow  初始化菜单   
         */
        private void initPopupWindow() {
            PopupWindowAdapter adapter = new PopupWindowAdapter();
            mlistView.setAdapter(adapter);     //mlistView  是mPopView 中的listview

    // 初始化popwindow , 载入布局文件 if (mPopupWindow == null) { // mPopView view对象xml文件 ,载入到popwindow mPopupWindow = new PopupWindow(mPopView, mTopLayout.getWidth(), //mTopLayout控件的宽 ,mPopView是一个xml LayoutParams.WRAP_CONTENT, true); mPopupWindow.setBackgroundDrawable(new BitmapDrawable()); } if (mPopupWindow.isShowing()) { //开的时候 , 就关闭 mPopupWindow.dismiss(); } else { mPopupWindow.showAsDropDown(mTopLayout, 0, -10); // 设置 ,mTopLayout的下面 } }
  • 相关阅读:
    2020软件工程作业02
    2020软件工程作业01
    并发编程—协程
    并发编程—线程
    并发编程—进程
    python网络编程总结
    前端-Javascript
    前端-jQuery
    前端-CSS
    前端-Html
  • 原文地址:https://www.cnblogs.com/java-g/p/4129689.html
Copyright © 2011-2022 走看看