本文整理了Java中android.widget.PopupWindow.isShowing()
方法的一些代码示例,展示了PopupWindow.isShowing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupWindow.isShowing()
方法的具体详情如下:
包路径:android.widget.PopupWindow
类名称:PopupWindow
方法名:isShowing
暂无
代码示例来源:origin: arcadefire/nice-spinner
@Override
public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
bundle.putInt(SELECTED_INDEX, selectedIndex);
bundle.putBoolean(IS_ARROW_HIDDEN, isArrowHidden);
bundle.putInt(ARROW_DRAWABLE_RES_ID, arrowDrawableResId);
if (popupWindow != null) {
bundle.putBoolean(IS_POPUP_SHOWING, popupWindow.isShowing());
}
return bundle;
}
代码示例来源:origin: square/assertj-android
public PopupWindowAssert isShowing() {
isNotNull();
assertThat(actual.isShowing()) //
.overridingErrorMessage("Expected to be showing but was not.") //
.isTrue();
return this;
}
代码示例来源:origin: square/assertj-android
public PopupWindowAssert isNotShowing() {
isNotNull();
assertThat(actual.isShowing()) //
.overridingErrorMessage("Expected to not be showing but was.") //
.isFalse();
return this;
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public void onScrollChanged() {
if (mAnchorViewRef.get() != null &&
mPopupWindow != null &&
mPopupWindow.isShowing()) {
if (mPopupWindow.isAboveAnchor()) {
mPopupContent.showBottomArrow();
} else {
mPopupContent.showTopArrow();
}
}
}
};
代码示例来源:origin: facebook/facebook-android-sdk
private void updateArrows() {
if (mPopupWindow != null && mPopupWindow.isShowing()) {
if (mPopupWindow.isAboveAnchor()) {
mPopupContent.showBottomArrow();
} else {
mPopupContent.showTopArrow();
}
}
}
代码示例来源:origin: arcadefire/nice-spinner
@Override
public boolean onTouchEvent(MotionEvent event) {
if (isEnabled() && event.getAction() == MotionEvent.ACTION_UP) {
if (!popupWindow.isShowing()) {
showDropDown();
} else {
dismissDropDown();
}
}
return super.onTouchEvent(event);
}
代码示例来源:origin: mikepenz/Android-Iconics
int a = motionEvent.getAction();
if (a == MotionEvent.ACTION_DOWN) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
clipboard.setPrimaryClip(clip);
} else if (a == MotionEvent.ACTION_UP || a == MotionEvent.ACTION_CANCEL || a == MotionEvent.ACTION_OUTSIDE) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
代码示例来源:origin: zyyoona7/EasyPopup
/**
* 是否正在显示
*
* @return
*/
public boolean isShowing() {
return mPopupWindow != null && mPopupWindow.isShowing();
}
代码示例来源:origin: willowtreeapps/Hyperion-Android
void dismissPopupIfNeeded() {
if (currentDetailWindow != null && currentDetailWindow.isShowing()) {
currentDetailWindow.dismiss();
}
}
}
代码示例来源:origin: pinguo-zhouwei/CustomPopwindow
/**
* 关闭popWindow
*/
public void dissmiss(){
if(mOnDismissListener!=null){
mOnDismissListener.onDismiss();
}
//如果设置了背景变暗,那么在dissmiss的时候需要还原
if(mWindow!=null){
WindowManager.LayoutParams params = mWindow.getAttributes();
params.alpha = 1.0f;
mWindow.setAttributes(params);
}
if(mPopupWindow!=null && mPopupWindow.isShowing()){
mPopupWindow.dismiss();
}
}
代码示例来源:origin: OCNYang/Android-Animation-Set
private void showImgPopupWindow(View anchor) {
if (mImgPopupWindow == null) {
ImageView view = new ImageView(this);
view.setImageDrawable(getDrawable(R.drawable.img_popup));
mImgPopupWindow = new PopupWindow(view, anchor.getMeasuredWidth(), anchor.getMeasuredWidth());
mImgPopupWindow.setAnimationStyle(R.style.popup_anim_style);
}
if (mImgPopupWindow.isShowing()) {
mImgPopupWindow.dismiss();
} else {
mImgPopupWindow.showAsDropDown(anchor);
}
}
}
代码示例来源:origin: zyyoona7/EasyPopup
/**
* PopupWindow消失后处理一些逻辑
*/
private void handleDismiss() {
if (mOnDismissListener != null) {
mOnDismissListener.onDismiss();
}
//清除背景变暗
clearBackgroundDim();
if (mPopupWindow != null && mPopupWindow.isShowing()) {
mPopupWindow.dismiss();
}
onPopupWindowDismiss();
}
代码示例来源:origin: stackoverflow.com
@Override
public void onClick(View v) {
if (mPopupMenu != null && mPopupMenu.isShowing()) {
mPopupMenu.dismiss();
if (mPopupMenu != null && mPopupMenu.isShowing()) {
mPopupMenu.dismiss();
代码示例来源:origin: AntonioRedondo/AnotherMonitor
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putInt(C.orientation, orientation);
outState.putBoolean(C.menuShown, mPWMenu.isShowing());
outState.putBoolean(C.settingsShown, settingsShown);
outState.putBoolean(C.canvasLocked, canvasLocked);
}
代码示例来源:origin: PhilippC/keepass2android
public boolean handleBack() {
if (mMiniKeyboardPopup.isShowing()) {
dismissPopupKeyboard();
return true;
}
return false;
}
}
代码示例来源:origin: PhilippC/keepass2android
public void dismissPreview(long delay) {
if (mPreviewPopup.isShowing()) {
sendMessageDelayed(obtainMessage(MSG_DISMISS_PREVIEW), delay);
}
}
代码示例来源:origin: PhilippC/keepass2android
private void dismissPopupKeyboard() {
if (mMiniKeyboardPopup.isShowing()) {
mMiniKeyboardPopup.dismiss();
mMiniKeyboard = null;
mMiniKeyboardOriginX = 0;
mMiniKeyboardOriginY = 0;
invalidateAllKeys();
}
}
代码示例来源:origin: jaredrummler/MaterialSpinner
@Override public boolean onTouchEvent(@NonNull MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (isEnabled() && isClickable()) {
if (!popupWindow.isShowing()) {
expand();
} else {
collapse();
}
}
}
return super.onTouchEvent(event);
}
代码示例来源:origin: bilibili/BiliShare
@Override
public void show() {
createShareWindowIfNeed();
if (!mShareWindow.isShowing()) {
mShareWindow.showAtLocation(mAnchorView, Gravity.BOTTOM, 0, 0);
}
showEnterAnimation();
}
代码示例来源:origin: PhilippC/keepass2android
public void popupPreview(long delay, int keyIndex, PointerTracker tracker) {
removeMessages(MSG_POPUP_PREVIEW);
if (mPreviewPopup.isShowing() && mPreviewText.getVisibility() == VISIBLE) {
// Show right away, if it's already visible and finger is moving around
showKey(keyIndex, tracker);
} else {
sendMessageDelayed(obtainMessage(MSG_POPUP_PREVIEW, keyIndex, 0, tracker),
delay);
}
}
内容来源于网络,如有侵权,请联系作者删除!