當前位置: 首頁>>代碼示例>>Java>>正文


Java OnDismissListener類代碼示例

本文整理匯總了Java中android.widget.PopupWindow.OnDismissListener的典型用法代碼示例。如果您正苦於以下問題:Java OnDismissListener類的具體用法?Java OnDismissListener怎麽用?Java OnDismissListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OnDismissListener類屬於android.widget.PopupWindow包,在下文中一共展示了OnDismissListener類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initPopupWindow

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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);
			}
		});

	}
 
開發者ID:qizhenghao,項目名稱:HiBangClient,代碼行數:20,代碼來源:RecommendActivity.java

示例2: pointMeSendRedPackage

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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;
                }
            });
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:24,代碼來源:PaySucceedActivity.java

示例3: PicPopupWindow

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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);
}
 
開發者ID:YuntaoWei,項目名稱:PictureShow,代碼行數:27,代碼來源:PicPopupWindow.java

示例4: initProgressDialog

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
/**
 * 初始化進度條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;
}
 
開發者ID:huang303513,項目名稱:Coding-Android,代碼行數:26,代碼來源:DialogUtil.java

示例5: initListDirPopupWindw

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
/**
 * 初始化展示文件夾的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);
}
 
開發者ID:cxbiao,項目名稱:Android_Study_Demos,代碼行數:26,代碼來源:ImageChooseActivity.java

示例6: initListDirPopupWindw

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
/**
 * 初始化展示文件夾的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);
}
 
開發者ID:ChenAt,項目名稱:Translation,代碼行數:25,代碼來源:LoadPictureAcitivity.java

示例7: updateListDirPopupWindw

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
/**
 * 初始化展示文件夾的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);
}
 
開發者ID:birdcopy,項目名稱:Android-Birdcopy-Application,代碼行數:24,代碼來源:ChoosePictureActivity.java

示例8: onClick

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
@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();
            }
        }
    }
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:23,代碼來源:PhotoSelectionHandler19.java

示例9: onClick

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
@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();
            }
        }
    }
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:23,代碼來源:PhotoSelectionHandler.java

示例10: initPopupWindow

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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);
		}
	});

}
 
開發者ID:qizhenghao,項目名稱:HiBangClient,代碼行數:41,代碼來源:FriendActivity.java

示例11: share

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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;
                }
            });
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:40,代碼來源:VideoShotEditActivity.java

示例12: initPopupWindow

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
@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() {

            }
        });
    }
}
 
開發者ID:LegendKe,項目名稱:MyTravelingDiary,代碼行數:28,代碼來源:NIMPopupMenu.java

示例13: m2273d

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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;
}
 
開發者ID:Qwaz,項目名稱:solved-hacking-problem,代碼行數:31,代碼來源:C0281v.java

示例14: init

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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);
					}
				}
			}
		});
	}
 
開發者ID:luoxianli,項目名稱:GridPassword,代碼行數:34,代碼來源:CustomBoardEditText.java

示例15: onShowMenu

import android.widget.PopupWindow.OnDismissListener; //導入依賴的package包/類
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);
}
 
開發者ID:qibin0506,項目名稱:LitePlayer,代碼行數:31,代碼來源:MainActivity.java


注:本文中的android.widget.PopupWindow.OnDismissListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。