Java 类android.widget.PopupWindow.OnDismissListener 实例源码

项目:HiBangClient    文件:RecommendActivity.java   
private void initPopupWindow() {

        mPopupWindow = new NearByPopupWindow(this);
        mPopupWindow.setOnSubmitClickListener(new onSubmitClickListener() {

            @Override
            public void onClick() {
                // mPeopleFragment.onManualRefresh();
            }
        });
        mPopupWindow.setOnDismissListener(new OnDismissListener() {

            @Override
            public void onDismiss() {
                mHeaderSpinner.initSpinnerState(false);
            }
        });

    }
项目:letv    文件:PaySucceedActivity.java   
private void pointMeSendRedPackage() {
    if (this.mHalfPlaySharePopwindow == null) {
        ShareUtils.RequestShareLink(this);
        if (this.mRedPacketBean != null) {
            this.mHalfPlaySharePopwindow = new HalfPlaySharePopwindow(this, 8, this.mRedPacketBean.title, this.mRedPacketBean.url, LetvUrlMaker.getSharedSucceedUrl(this.mRedPacketBean.channelId + "", this.mOrderId), this.mRedPacketBean.mobilePic, this.mRedPacketBean.shareDesc, this.mGiftShareAwardCallback);
            this.mHalfPlaySharePopwindow.showPopupWindow(this.mRoot);
            this.mHalfPlaySharePopwindow.setOnDismissListener(new OnDismissListener(this) {
                final /* synthetic */ PaySucceedActivity this$0;

                {
                    if (HotFix.PREVENT_VERIFY) {
                        System.out.println(VerifyLoad.class);
                    }
                    this.this$0 = this$0;
                }

                public void onDismiss() {
                    this.this$0.mHalfPlaySharePopwindow = null;
                }
            });
        }
    }
}
项目:PictureShow    文件:PicPopupWindow.java   
private PicPopupWindow(Context context) {
    mContext = context;
    mInflater = (LayoutInflater) mContext
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mPopupContent = (ViewGroup) mInflater.inflate(
            R.layout.popup_window_list, null);
    mPopupItemContent = (ViewGroup) mPopupContent
            .findViewById(R.id.popup_window_item_content);
    title = (TextView) mPopupContent
            .findViewById(R.id.popup_window_title_text);
    mPopupWindow = new PopupWindow(mPopupContent,
            LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
    mPopupWindow.setFocusable(true);
    mPopupWindow.setBackgroundDrawable(new BitmapDrawable());
    mPopupWindow.setOnDismissListener(new OnDismissListener() {
        @Override
        public void onDismiss() {
            // TODO Auto-generated method stub
            resetItemByTag(setTag);
            if (mAnimationListener != null) {
                mAnimationListener.doAnimation(false);
            }
        }
    });
    mPopupWindow.setAnimationStyle(R.style.popup_window_animation);
}
项目:Coding-Android    文件:DialogUtil.java   
/**
 * 初始化进度条dialog
 *
 * @param activity
 * @return
 */
public static LoadingPopupWindow initProgressDialog(Activity activity, OnDismissListener onDismissListener) {
    if (activity == null || activity.isFinishing()) {
        return null;
    }

    // 获得背景(6个图片形成的动画)
    //AnimationDrawable animDance = (AnimationDrawable) imgDance.getBackground();

    //final PopupWindow popupWindow = new PopupWindow(popupView, RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
    final LoadingPopupWindow popupWindow = new LoadingPopupWindow(activity);
    ColorDrawable cd = new ColorDrawable(-0000);
    popupWindow.setBackgroundDrawable(cd);
    popupWindow.setTouchable(true);
    popupWindow.setOnDismissListener(onDismissListener);

    popupWindow.setFocusable(true);
    //animDance.start();
    return popupWindow;
}
项目:Android_Study_Demos    文件:ImageChooseActivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void initListDirPopupWindw()
{
    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7),
            mImageFloders, LayoutInflater.from(getApplicationContext())
                    .inflate(R.layout.list_dir, null));

    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener()
    {

        @Override
        public void onDismiss()
        {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:Translation    文件:LoadPictureAcitivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void initListDirPopupWindw()
{
    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7),
            mImageFloders, LayoutInflater.from(getApplicationContext()).inflate(
            R.layout.list_dir, null));
    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener()
    {

        @Override
        public void onDismiss()
        {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:Android-Birdcopy-Application    文件:ChoosePictureActivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void updateListDirPopupWindw() {

    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7),
            mImageFloders, LayoutInflater.from(getApplicationContext())
            .inflate(R.layout.de_ph_list_dir, null));

    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener() {

        @Override
        public void onDismiss() {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:base-imageloader    文件:LocalImageloaderActivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void initListDirPopupWindw()
{
    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7),
            mImageFloders, LayoutInflater.from(getApplicationContext())
                    .inflate(R.layout.list_dir, null));

    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener()
    {

        @Override
        public void onDismiss()
        {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:base-imageloader    文件:LocalImageloaderActivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void initListDirPopupWindw()
{
    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7),
            mImageFloders, LayoutInflater.from(getApplicationContext())
                    .inflate(R.layout.list_dir, null));

    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener()
    {

        @Override
        public void onDismiss()
        {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:silent-contacts-android    文件:PhotoSelectionHandler19.java   
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onClick(View v) {
    final PhotoActionListener listener = getListener();
    if (listener != null) {
        if (getWritableEntityIndex() != -1) {
            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
                showPhotoActionDialog(listener);
            }
            else {
                mPopup = PhotoActionPopup.createPopupMenu(mContext, mPhotoView, listener, mPhotoMode);
                mPopup.setOnDismissListener(new OnDismissListener() {
                @Override
                public void onDismiss() {
                    listener.onPhotoSelectionDismissed();
                }
            });
            mPopup.show();
            }
        }
    }
}
项目:silent-contacts-android    文件:PhotoSelectionHandler.java   
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onClick(View v) {
    final PhotoActionListener listener = getListener();
    if (listener != null) {
        if (getWritableEntityIndex() != -1) {
            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
                showPhotoActionDialog(listener);
            }
            else {
            mPopup = PhotoActionPopup.createPopupMenu(mContext, mPhotoView, listener, mPhotoMode);
            mPopup.setOnDismissListener(new OnDismissListener() {
                @Override
                public void onDismiss() {
                    listener.onPhotoSelectionDismissed();
                }
            });
            mPopup.show();
            }
        }
    }
}
项目:HiBangClient    文件:FriendActivity.java   
private void initPopupWindow()
{

    mPopupWindow = new PublishSelectPopupWindow(this);
    mPopupWindow.setOnSubmitClickListener(new onSubmitClickListener() {

        @Override
        public void onClick() {
        //  mFriendFragment.onManualRefresh();

         mHeaderLayout.changeMiddleTitle(" 交易中");
         if(!currentFragment)
         mFriendFragment.updateTradingAdapter();
         else
         mHelperFragment.updateTradingAdapter();
        }
    });

    mPopupWindow.setOnFinishClickListener(new onFinishClickListener() {

        @Override
        public void onClick() {
        //  mFriendFragment.onManualRefresh();           
         mHeaderLayout.changeMiddleTitle("交易完成");
         if(!currentFragment)
         mFriendFragment.updateSuccessAdapter();
         else
         mHelperFragment.updateSuccessAdapter();
        }
    });

    mPopupWindow.setOnDismissListener(new OnDismissListener() {

        @Override
        public void onDismiss() {
            mHeaderSpinner.initSpinnerState(false);
        }
    });

}
项目:letv    文件:VideoShotEditActivity.java   
public void share() {
    if (this.currentPhotoPos < this.photoFileName.getPhoto().size() && this.vsShareInfoBean != null) {
        String str;
        String randText = ((PhotoInfoBean) this.photoFileName.getPhoto().get(this.currentPhotoPos)).getPhotoDesc();
        VideoShotShareInfoBean videoShotShareInfoBean = this.vsShareInfoBean;
        String str2 = ((PhotoInfoBean) this.photoFileName.getPhoto().get(this.currentPhotoPos)).photoPath;
        if (TextUtils.isEmpty(this.vsShareInfoBean.mVideoName)) {
            str = "";
        } else {
            str = this.vsShareInfoBean.mVideoName + " " + (this.vsShareInfoBean.mVideoBean == null ? "" : this.vsShareInfoBean.mVideoBean.episode);
        }
        videoShotShareInfoBean.mPhotoPath = getFileAddedHybridWatermark(str2, 2130838567, str, randText);
        VideoShotShareInfoBean videoShotShareInfoBean2 = this.vsShareInfoBean;
        if (TextUtils.isEmpty(randText)) {
            randText = getResources().getString(2131099925);
        }
        videoShotShareInfoBean2.mRandText = randText;
        if (this.mHalfPlaySharePopwindow == null) {
            ShareUtils.RequestShareLink(this.mContext);
            this.mHalfPlaySharePopwindow = new HalfPlaySharePopwindow(this, 4);
            this.mHalfPlaySharePopwindow.setVideoShotData(this.vsShareInfoBean);
            this.mHalfPlaySharePopwindow.showPopupWindow(this.mRootLayout);
            this.mHalfPlaySharePopwindow.setOnDismissListener(new OnDismissListener(this) {
                final /* synthetic */ VideoShotEditActivity this$0;

                {
                    if (HotFix.PREVENT_VERIFY) {
                        System.out.println(VerifyLoad.class);
                    }
                    this.this$0 = this$0;
                }

                public void onDismiss() {
                    this.this$0.mHalfPlaySharePopwindow = null;
                }
            });
        }
    }
}
项目:MyTravelingDiary    文件:NIMPopupMenu.java   
@SuppressWarnings("deprecation")
private void initPopupWindow() {
    if (popWindow == null) {
        //popWindow = new PopupWindow(rootView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        popWindow = new PopupWindow(context);
        popWindow.setContentView(rootView);
        popWindow.setWidth(WindowManager.LayoutParams.WRAP_CONTENT);
        if (scroll) {
            popWindow.setHeight(ScreenUtil.getDisplayHeight() * 2 / 3);
        } else {
            popWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
        }
        popWindow.setTouchable(true);
        popWindow.setBackgroundDrawable(new BitmapDrawable());
        // popWindow.setContentView(rootView);
        //setPopupWindowSize();
        // popWindow.setHeight(rootView.getMeasuredHeight());

        popWindow.setOnDismissListener(new OnDismissListener() {

            @Override
            public void onDismiss() {

            }
        });
    }
}
项目:solved-hacking-problem    文件:C0281v.java   
public boolean m2273d() {
    boolean z = false;
    this.f1066l = new by(this.f1057c, null, this.f1063i, this.f1064j);
    this.f1066l.m2564a((OnDismissListener) this);
    this.f1066l.m2562a((OnItemClickListener) this);
    this.f1066l.m2563a(this.f1060f);
    this.f1066l.m2565a(true);
    View view = this.f1065k;
    if (view == null) {
        return false;
    }
    if (this.f1067m == null) {
        z = true;
    }
    this.f1067m = view.getViewTreeObserver();
    if (z) {
        this.f1067m.addOnGlobalLayoutListener(this);
    }
    this.f1066l.m2561a(view);
    this.f1066l.m2570d(this.f1072r);
    if (!this.f1070p) {
        this.f1071q = m2259g();
        this.f1070p = true;
    }
    this.f1066l.m2574f(this.f1071q);
    this.f1066l.m2576g(2);
    this.f1066l.m2567c();
    this.f1066l.m2583m().setOnKeyListener(this);
    return true;
}
项目:solved-hacking-problem    文件:C0281v.java   
public boolean m2273d() {
    boolean z = false;
    this.f1066l = new by(this.f1057c, null, this.f1063i, this.f1064j);
    this.f1066l.m2564a((OnDismissListener) this);
    this.f1066l.m2562a((OnItemClickListener) this);
    this.f1066l.m2563a(this.f1060f);
    this.f1066l.m2565a(true);
    View view = this.f1065k;
    if (view == null) {
        return false;
    }
    if (this.f1067m == null) {
        z = true;
    }
    this.f1067m = view.getViewTreeObserver();
    if (z) {
        this.f1067m.addOnGlobalLayoutListener(this);
    }
    this.f1066l.m2561a(view);
    this.f1066l.m2570d(this.f1072r);
    if (!this.f1070p) {
        this.f1071q = m2259g();
        this.f1070p = true;
    }
    this.f1066l.m2574f(this.f1071q);
    this.f1066l.m2576g(2);
    this.f1066l.m2567c();
    this.f1066l.m2583m().setOnKeyListener(this);
    return true;
}
项目:GridPassword    文件:CustomBoardEditText.java   
private void init() {

        // 隐藏系统键盘
        hideSysInput();

        initAttributes(context);

        numKeyboard = new Keyboard(context, R.layout.keyboard_symbols_md);

        keyboardView = (KeyboardView) LayoutInflater.from(context).inflate(
                R.layout.keyboard_view, null);
        keyboardView.setEnabled(true);
        keyboardView.setPreviewEnabled(false);
        keyboardView.setOnKeyboardActionListener(listener);

        mKeyboardWindow = new PopupWindow(keyboardView,
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
        mKeyboardWindow.setAnimationStyle(R.style.AnimationFade);
        mKeyboardWindow.setOnDismissListener(new OnDismissListener() {

            @Override
            public void onDismiss() {
                if (scrolldis > 0) {
                    int temp = scrolldis;
                    scrolldis = 0;
                    if (null != mContentView) {
                        mContentView.scrollBy(0, -temp);
                    }
                }
            }
        });
    }
项目:LitePlayer    文件:MainActivity.java   
private void onShowMenu() {
    onPopupWindowShown();
    if(mPopupWindow == null) {
        View view = View.inflate(this, R.layout.exit_pop_layout, null);
        View shutdown = view.findViewById(R.id.tv_pop_shutdown);
        View exit = view.findViewById(R.id.tv_pop_exit);
        View cancel = view.findViewById(R.id.tv_pop_cancel);

        // 不需要共享变量, 所以放这没事
        shutdown.setOnClickListener(this);
        exit.setOnClickListener(this);
        cancel.setOnClickListener(this);

        mPopupWindow = new PopupWindow(view,
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT, true);
        mPopupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        mPopupWindow.setAnimationStyle(R.style.popwin_anim);
        mPopupWindow.setFocusable(true);
        mPopupWindow.setOnDismissListener(new OnDismissListener() {
            @Override
            public void onDismiss() {
                onPopupWindowDismiss();
            }
        });
    }

    mPopupWindow.showAtLocation(getWindow().getDecorView(), 
            Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);
}
项目:ItHome    文件:LaPinAddressAdd.java   
public void initPopupWindow(){
    // 利用layoutInflater获得View
            LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View view = layoutInflater.inflate(R.layout.citys, null);
            mProvince = (WheelView) view.findViewById(R.id.id_province);
            mCity = (WheelView) view.findViewById(R.id.id_city);
            mArea = (WheelView) view.findViewById(R.id.id_area);


            // 下面是两种方法得到宽度和高度 getWindow().getDecorView().getWidth()

            popupWindow = new PopupWindow(view,
                    WindowManager.LayoutParams.MATCH_PARENT,
                    WindowManager.LayoutParams.WRAP_CONTENT);
            // 设置popWindow弹出窗体可点击,这句话必须添加,并且是true
            popupWindow.setFocusable(true);

            // 必须要给调用这个方法,否则点击popWindow以外部分,popWindow不会消失
             popupWindow.setBackgroundDrawable(new BitmapDrawable());


            mProvince.setViewAdapter(new ArrayWheelAdapter<String>(LaPinAddressAdd.this, mProvinceDatas));
                // 添加change事件
            mProvince.addChangingListener(this);
                // 添加change事件
            mCity.addChangingListener(this);
                // 添加change事件
            mArea.addChangingListener(this);

            mProvince.setVisibleItems(5);
            mCity.setVisibleItems(5);
            mArea.setVisibleItems(5);
            popupWindow.setOnDismissListener(new OnDismissListener() {
                public void onDismiss() {                       
                    city.setText(mCurrentProviceName+mCurrentCityName+mCurrentAreaName);
                }
            });

}
项目:FMTech    文件:RateReviewModuleV2Layout.java   
final void configureOverflow(final boolean paramBoolean)
{
  this.mRatingOverflow.setOnClickListener(new View.OnClickListener()
  {
    public final void onClick(View paramAnonymousView)
    {
      PlayPopupMenu localPlayPopupMenu = new PlayPopupMenu(RateReviewModuleV2Layout.this.getContext(), RateReviewModuleV2Layout.this.mRatingOverflow);
      Resources localResources = RateReviewModuleV2Layout.this.getContext().getResources();
      FinskyApp.get().getEventLogger().logClickEvent(238, null, RateReviewModuleV2Layout.this.mParentNode);
      if (!paramBoolean) {
        localPlayPopupMenu.addMenuItem(1, localResources.getString(2131362106), true, RateReviewModuleV2Layout.this);
      }
      localPlayPopupMenu.addMenuItem(2, localResources.getString(2131362078), true, RateReviewModuleV2Layout.this);
      RateReviewModuleV2Layout.this.mRatingOverflow.setImageResource(2130838073);
      localPlayPopupMenu.mOnPopupDismissListener = new PopupWindow.OnDismissListener()
      {
        public final void onDismiss()
        {
          RateReviewModuleV2Layout.this.mRatingOverflow.setImageResource(2130838071);
        }
      };
      localPlayPopupMenu.show();
    }
  });
  this.mRatingOverflow.setVisibility(0);
  if (this.mOverflowArea.isEmpty())
  {
    this.mRatingOverflow.getHitRect(this.mOverflowArea);
    this.mOverflowArea.inset(-this.mOverflowTouchExtend, -this.mOverflowTouchExtend);
    setTouchDelegate(new PlayTouchDelegate(this.mOverflowArea, this.mRatingOverflow));
  }
}
项目:365browser    文件:ChromeTabbedActivity.java   
private void showFeatureEngagementTextBubbleForDownloadHome() {
    final FeatureEngagementTracker tracker =
            FeatureEngagementTrackerFactory.getFeatureEngagementTrackerForProfile(
                    Profile.getLastUsedProfile());
    if (!tracker.shouldTriggerHelpUI(FeatureConstants.DOWNLOAD_HOME_FEATURE)) return;

    ViewAnchoredTextBubble textBubble = new ViewAnchoredTextBubble(this,
            getToolbarManager().getMenuButton(), R.string.iph_download_home_text,
            R.string.iph_download_home_accessibility_text);
    textBubble.setDismissOnTouchInteraction(true);
    textBubble.addOnDismissListener(new OnDismissListener() {
        @Override
        public void onDismiss() {
            mHandler.post(new Runnable() {
                @Override
                public void run() {
                    tracker.dismissed(FeatureConstants.DOWNLOAD_HOME_FEATURE);
                    getAppMenuHandler().setMenuHighlight(null);
                }
            });
        }
    });
    getAppMenuHandler().setMenuHighlight(R.id.downloads_menu_id);
    int yInsetPx =
            getResources().getDimensionPixelOffset(R.dimen.text_bubble_menu_anchor_y_inset);
    textBubble.setInsetPx(0, FeatureUtilities.isChromeHomeEnabled() ? yInsetPx : 0, 0,
            FeatureUtilities.isChromeHomeEnabled() ? 0 : yInsetPx);
    textBubble.show();
}
项目:365browser    文件:TextBubble.java   
@Override
public void onDismiss() {
    if (mIgnoreDismissal) return;

    mHandler.removeCallbacks(mDismissRunnable);
    for (OnDismissListener listener : mDismissListeners) listener.onDismiss();
}
项目:AndroidDemos    文件:ShowActivity.java   
private void initPop(){
    //View popupView = getLayoutInflater().inflate(R.layout.dialog_custom_view, null);
    mView = mInflater.inflate(R.layout.dialog_custom_view,null);
    mPopupWindow = new PopupWindow(mView, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, true);
       mPopupWindow.setTouchable(true);
       mPopupWindow.setOutsideTouchable(false);
       mPopupWindow.setBackgroundDrawable(new BitmapDrawable(getResources(), (Bitmap) null));
       mPopupWindow.getContentView().setFocusableInTouchMode(true);
       mPopupWindow.getContentView().setFocusable(true);
       mPopupWindow.setAnimationStyle(R.style.anim_menu_bottombar);
       mPopupWindow.setOnDismissListener(new OnDismissListener() {

        @Override
        public void onDismiss() {
            // TODO Auto-generated method stub
             lp.alpha = 1f;
             getWindow().setAttributes(lp); 
        }
    });
    gv_listing=(GridView)mView.findViewById(R.id.gv_listing);
    listingAdapter=new GridAdapter(this,myApp);
    gv_listing.setAdapter(listingAdapter);
    if(bt_listing==null||tv_listing==null){
        bt_listing=(Button)mView.findViewById(R.id.bt_listing);
        tv_listing=(TextView)mView.findViewById(R.id.tv_listing);
    }
    numlist = myApp.position+1+"/"+myApp.listSize;
    bt_listing.setOnClickListener(bt_listing_click);
    tv_listing.setText(numlist);
    gv_listing.setOnItemClickListener(gv_listing_listener);
}
项目:Android-Birdcopy-Application    文件:ChoosePictureActivity.java   
/**
 * 初始化展示文件夹的popupWindw
 */
private void initListDirPopupWindwDefault() {
    // - getStatusBarHeight()

    // 高度手动换算 44dp
    tv_titleHeight = ScreenSizeUtil.Dp2Px(this, 110);

    int dialogHeight = mScreenHeight - tv_titleHeight - mBottomLyHeight
            - getStatusBarHeight();

    mListImageDirPopupWindow = new ListImageDirPopupWindow(
            LayoutParams.MATCH_PARENT, dialogHeight, mImageFloders,
            LayoutInflater.from(getApplicationContext()).inflate(
                    R.layout.de_ph_list_dir, null));

    mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener() {

        @Override
        public void onDismiss() {
            // 设置背景颜色变暗
            WindowManager.LayoutParams lp = getWindow().getAttributes();
            lp.alpha = 1.0f;
            getWindow().setAttributes(lp);
        }
    });
    // 设置选择文件夹的回调
    mListImageDirPopupWindow.setOnImageDirSelected(this);
}
项目:iLocker    文件:CommentActivity.java   
private void initElements() {
    mLayoutFooterPlaceHolder = (LinearLayout) mLayoutComment.findViewById(R.id.fragment_comment_footer_placeholder);
    mImageClose = (ImageView) mLayoutComment.findViewById(R.id.fragment_comment_close);
    mImageSubmit = (ImageView) mLayoutComment.findViewById(R.id.fragment_comment_submit);
    mEditTextComment = (EditText) mLayoutComment.findViewById(R.id.fragment_comment_content);
    mEditTextComment.setOnClickListener(this);

    mEditTextComment.setText(content);
    mEditTextComment.setTextColor(color);

    mEditTextComment.setText(content);
    mEditTextComment.setSelection(mEditTextComment.getText().length());
    mIVColorButton = (NoSizeCircleColorView) mLayoutComment.findViewById(R.id.iv_color_btn);
    mIVColorButton.setColor(color);

    popupWindow = new PopupWindow(colorPickerView, LayoutParams.MATCH_PARENT, keyboardHeight, false);
    popupWindow.setWidth(width);
    popupWindow.setOnDismissListener(new OnDismissListener() {
        @Override
        public void onDismiss() {
            mLayoutFooterPlaceHolder.setVisibility(LinearLayout.GONE);
        }
    });
    findViewById(R.id.fragment_comment_layout_main).setOnClickListener(this);
    mLayoutComment.setOnClickListener(this);
    mIVColorButton.setOnClickListener(this);
    mImageClose.setOnClickListener(this);
    mImageSubmit.setOnClickListener(this);
}
项目:NIM_Android_UIKit    文件:NIMPopupMenu.java   
@SuppressWarnings("deprecation")
private void initPopupWindow() {
    if (popWindow == null) {
        //popWindow = new PopupWindow(rootView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        popWindow = new PopupWindow(context);
        popWindow.setContentView(rootView);
        popWindow.setWidth(WindowManager.LayoutParams.WRAP_CONTENT);
        if (scroll) {
            popWindow.setHeight(ScreenUtil.getDisplayHeight() * 2 / 3);
        } else {
            popWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
        }
        popWindow.setTouchable(true);
        popWindow.setBackgroundDrawable(new BitmapDrawable());
        // popWindow.setContentView(rootView);
        //setPopupWindowSize();
        // popWindow.setHeight(rootView.getMeasuredHeight());

        popWindow.setOnDismissListener(new OnDismissListener() {

            @Override
            public void onDismiss() {

            }
        });
    }
}
项目:Makeblock-App-For-Android    文件:LayoutView.java   
protected void startUpgradeing(){

    stopTimer();
    startTimer(500);
    engineState = STAGE_PROBING;

    if(blt!=null){
        blt.commMode = Bluetooth.MODE_FORWARD;
    }else{
        BluetoothLE.sharedManager().commMode = BluetoothLE.MODE_FORWARD;
    }

    uploadPb = ProgressDialog.show(this.mContext, getString(R.string.Upgrade_Firmware), getString(R.string.Please_Press_Reset_Button));
    uploadPb.setCancelable(true);
    uploadPb.setOnDismissListener(new DialogInterface.OnDismissListener() {
           @Override
           public void onDismiss(DialogInterface dialog) {
            if(blt!=null){
                blt.commMode = Bluetooth.MODE_LINE;
            }else{
                BluetoothLE.sharedManager().commMode = BluetoothLE.MODE_LINE;
            }
            stopTimer();
            engineState = STAGE_IDLE;
            disableAllModule();
            runBtn.setImageResource(R.drawable.run_button);
            //startTimer(1000);
           }
       });
}
项目:itmarry    文件:PullDownView.java   
public void initPopuWindow()
{
    View    window      = (View)activity.getLayoutInflater().inflate(R.layout.pulldown_layout, null);
    listView            = (ListView)window.findViewById(R.id.pulldown_listview);
    listaAdapter        = new PullDownListAdapter(activity, data);
    listView.setAdapter(listaAdapter);
    popupWindow         = new PopupWindow(window, width, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT,true);
    height = popupWindow.getHeight();
    popupWindow.setOutsideTouchable(true);
    popupWindow.setBackgroundDrawable(new BitmapDrawable());
    popupWindow.setOnDismissListener(new OnDismissListener() {

        @Override
        public void onDismiss() {
            // TODO Auto-generated method stub
            dataHandler.onPullDownViewDissmiss();
        }
    });
    listView.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {
            // TODO Auto-generated method stub
            dataHandler.selected(arg2);     // 接口实现选中后的处理
            popupWindow.dismiss();
        }

    });
}
项目:taxitwin-app    文件:MainActivity.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    settingsPopup = new SettingsPopup(this);
    settingsPopup.setOnDismissListener(new OnDismissListener() {

        public void onDismiss() {
            settingsMenuItem.setIcon(R.drawable.ic_action_expand);
        }
    });

    MapsInitializer.initialize(getApplicationContext());

    broadcastReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent.hasCategory(CATEGORY_OFFER_DATA_CHANGED)) {
                notifyChangedData();
            }
            if (intent.hasCategory(MyTaxiTwinActivity.CATEGORY_TAXITWIN_DATA_CHANGED)) {
                showTaxiTwinDialog();
            }
            if (intent.hasCategory(ServicesManagement.CATEGORY_GPS_DISABLED)) {
                DialogFragment alertFragment = new ServicesAlertDialogFragment(R.string.services_gps_alert_message);
                alertFragment.show(getFragmentManager(), "gps_alert");
            }
            if (intent.hasCategory(ServicesManagement.CATEGORY_NETWORK_DISABLED)) {
                DialogFragment alertFragment = new ServicesAlertDialogFragment(R.string.services_network_alert_message);
                alertFragment.show(getFragmentManager(), "network_alert");
            }
        }
    };

    buildGUI(savedInstanceState);
}
项目:Common-Library    文件:SwipeListView.java   
public void showUndoPopup(OnDismissListener listener, String text,
        OnClickListener click) {
    mUndoText.setText(text);
    mUndoPopup.showAtLocation(this, Gravity.CENTER_HORIZONTAL
            | Gravity.BOTTOM, 0, 12);
    mUndoPopup.setOnDismissListener(listener);
    mUndoButton.setOnClickListener(click);
}
项目:fanfouapp-opensource    文件:QuickAction.java   
/**
 * Set listener for window dismissed. This listener will only be fired if
 * the quicakction dialog is dismissed by clicking outside the dialog or
 * clicking on sticky item.
 */
public void setOnDismissListener(
        final QuickAction.OnDismissListener listener) {
    setOnDismissListener(this);

    mDismissListener = listener;
}
项目:HiBangClient    文件:HelperPublishFragment.java   
@Override
public boolean onChildClick(ExpandableListView parent, View v,
        int groupPosition, int childPosition, long id) {

    //System.out.println("群编号为:" + groupPosition + "子编号为:" + childPosition);

    int count = 0;
    for (int i = 1; i < groupPosition; i++) {
        count += childList.get(i).size();
    }
    count = count + childPosition + 1;
    // CPubHelpMeMsg msg = new CPubHelpMeMsg();
    // msg.setReqItemID(count);
    // msg.setUserID(application.getUser().getUserID());
    // msg.setStartTime("2014-03-16 12:30:00");
    // msg.setEndTime("2014-03-17 12:30:00");
    // msg.setReqDetail("最好是粉色的哦!");
    // application.client.sendMessage(msg);
    // MyPubHelpMe myMsg = new
    // MyPubHelpMe(msg,childList.get(groupPosition).get(childPosition).getName());
    // DBManage.addCPubHelpMe(myMsg);

    mPopupWindow = new PublishPopupWindow(mActivity, mApplication, count,
            childList.get(groupPosition).get(childPosition).getName(),flag);
    mPopupWindow.setOnSubmitClickListener(new onSubmitClickListener() {

        @Override
        public void onClick() {


        }
    });
    mPopupWindow.setOnDismissListener(new OnDismissListener() {

        public void onDismiss() {
            // mHeaderSpinner.initSpinnerState(false);
        }
    });

    mPopupWindow
            .showViewTopCenter(findViewById(R.id.publish_fragment_root));

    return false;
}
项目:HiBangClient    文件:PublishFragment.java   
@Override
public boolean onChildClick(ExpandableListView parent, View v,
        int groupPosition, int childPosition, long id) {

    System.out.println("群编号为:" + groupPosition + "子编号为:" + childPosition);

    int count = 0;
    for (int i = 1; i < groupPosition; i++) {
        count += childList.get(i).size();
    }
    count = count + childPosition + 1;
    // CPubHelpMeMsg msg = new CPubHelpMeMsg();
    // msg.setReqItemID(count);
    // msg.setUserID(application.getUser().getUserID());
    // msg.setStartTime("2014-03-16 12:30:00");
    // msg.setEndTime("2014-03-17 12:30:00");
    // msg.setReqDetail("最好是粉色的哦!");
    // application.client.sendMessage(msg);
    // MyPubHelpMe myMsg = new
    // MyPubHelpMe(msg,childList.get(groupPosition).get(childPosition).getName());
    // DBManage.addCPubHelpMe(myMsg);

    mPopupWindow = new PublishPopupWindow(mActivity, mApplication, count,
            childList.get(groupPosition).get(childPosition).getName(),flag);
    mPopupWindow.setOnSubmitClickListener(new onSubmitClickListener() {

        @Override
        public void onClick() {


        }
    });
    mPopupWindow.setOnDismissListener(new OnDismissListener() {

        public void onDismiss() {
            // mHeaderSpinner.initSpinnerState(false);
        }
    });

    mPopupWindow
            .showViewTopCenter(findViewById(R.id.publish_fragment_root));

    return false;
}
项目:letv    文件:ExitRetainPopupwindow.java   
private void initPopupwindow() {
    this.mPopupWindow = new ExitRetainMyPopupwindow(LetvApplication.getInstance());
    this.mPopupWindow.setWidth(UIs.getScreenWidth());
    this.mPopupWindow.setHeight(UIs.getScreenHeight());
    if (VERSION.SDK_INT >= 11) {
        this.mPopupWindow.setFocusable(true);
    }
    this.mPopupWindow.setBackgroundDrawable(new BitmapDrawable(this.mContext.getResources()));
    this.contentView = LayoutInflater.from(this.mContext).inflate(R.layout.exit_retain_popupwindow, null);
    this.mPopupWindow.setContentView(this.contentView);
    this.mPopupWindow.setOnDismissListener(new OnDismissListener(this) {
        final /* synthetic */ ExitRetainPopupwindow this$0;

        {
            if (HotFix.PREVENT_VERIFY) {
                System.out.println(VerifyLoad.class);
            }
            this.this$0 = this$0;
        }

        public void onDismiss() {
            LogInfo.log(ExitRetainPopupwindow.TAG, " onDismiss isClickLookBtn : " + this.this$0.isClickLookBtn + " isNewUser " + this.this$0.isNewUser() + " isFristShow : " + this.this$0.mCurrentHomeMetaData.isFristShow);
            if (this.this$0.mCurrentHomeMetaData == null || this.this$0.mCurrentHomeMetaData.isFristShow || !this.this$0.isNewUser() || this.this$0.mExitRetainDataMap.size() <= 1) {
                if (!this.this$0.isClickLookBtn || !this.this$0.isNewUser()) {
                    this.this$0.mExitRetainDataMap.clear();
                } else if (this.this$0.isNewUser()) {
                    this.this$0.isClickLookBtn = false;
                }
                this.this$0.mExitRetainCallBack.onDismissPopWindow();
                return;
            }
            LogInfo.log(" 当前对话框是不带按钮的 ");
        }
    });
    this.mPopupWindow.setDismissListener(new DismissListener(this) {
        final /* synthetic */ ExitRetainPopupwindow this$0;

        {
            if (HotFix.PREVENT_VERIFY) {
                System.out.println(VerifyLoad.class);
            }
            this.this$0 = this$0;
        }

        public void onPreDismiss() {
            LogInfo.log(ExitRetainPopupwindow.TAG, "initPopupwindow  onPreDismiss >> ");
            if (this.this$0.isClickBackKey()) {
                this.this$0.pressBackKey = true;
            }
        }

        public void onDismissed() {
            LogInfo.log(ExitRetainPopupwindow.TAG, "initPopupwindow  onDismissed >> " + this.this$0.pressBackKey);
            if (!this.this$0.pressBackKey || this.this$0.mCurrentHomeMetaData == null || this.this$0.mCurrentHomeMetaData.isFristShow || this.this$0.mExitRetainCallBack == null) {
                this.this$0.pressBackKey = false;
                return;
            }
            LogInfo.log(ExitRetainPopupwindow.TAG, "initPopupwindow  onExitAppliation >> ");
            this.this$0.mExitRetainCallBack.onExitAppliation();
        }
    });
}
项目:TreebolicLib    文件:QuickAction.java   
/**
 * Set listener for window dismissed. This listener will only be fired if the quickaction dialog is dismissed by clicking outside the dialog or clicking on
 * sticky item.
 */
public void setOnDismissListener(final OnDismissListener listener)
{
    setOnDismissListener(this);
    this.dismissListener = listener;
}
项目:boohee_v5.6    文件:ActivityChooserView.java   
public void setOnDismissListener(OnDismissListener listener) {
    this.mOnDismissListener = listener;
}
项目:boohee_v5.6    文件:ListPopupWindow.java   
public void setOnDismissListener(OnDismissListener listener) {
    this.mPopup.setOnDismissListener(listener);
}
项目:solved-hacking-problem    文件:ActivityChooserView.java   
public void setOnDismissListener(OnDismissListener onDismissListener) {
    this.f1172l = onDismissListener;
}
项目:solved-hacking-problem    文件:by.java   
public void m2564a(OnDismissListener onDismissListener) {
    this.f1379e.setOnDismissListener(onDismissListener);
}
项目:solved-hacking-problem    文件:ActivityChooserView.java   
public void setOnDismissListener(OnDismissListener onDismissListener) {
    this.f1172l = onDismissListener;
}