本文整理汇总了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);
}
});
}
示例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;
}
});
}
}
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
}
}
示例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();
}
}
}
}
示例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);
}
});
}
示例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;
}
});
}
}
}
示例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() {
}
});
}
}
示例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;
}
示例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);
}
}
}
});
}
示例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);
}