本文整理汇总了Java中android.widget.PopupWindow.setClippingEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java PopupWindow.setClippingEnabled方法的具体用法?Java PopupWindow.setClippingEnabled怎么用?Java PopupWindow.setClippingEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.PopupWindow
的用法示例。
在下文中一共展示了PopupWindow.setClippingEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import android.widget.PopupWindow; //导入方法依赖的package包/类
/**
* 添加一些属性设置
* @param popupWindow
*/
private void apply(PopupWindow popupWindow){
popupWindow.setClippingEnabled(mClippEnable);
if(mIgnoreCheekPress){
popupWindow.setIgnoreCheekPress();
}
if(mInputMode!=-1){
popupWindow.setInputMethodMode(mInputMode);
}
if(mSoftInputMode!=-1){
popupWindow.setSoftInputMode(mSoftInputMode);
}
if(mOnDismissListener!=null){
popupWindow.setOnDismissListener(mOnDismissListener);
}
if(mOnTouchListener!=null){
popupWindow.setTouchInterceptor(mOnTouchListener);
}
popupWindow.setTouchable(mTouchable);
}
示例2: apply
import android.widget.PopupWindow; //导入方法依赖的package包/类
private void apply(PopupWindow mPopupWindow) {
mPopupWindow.setClippingEnabled(this.mClippEnable);
if(this.mIgnoreCheekPress) {
mPopupWindow.setIgnoreCheekPress();
}
if(this.mInputMode != -1) {
mPopupWindow.setInputMethodMode(this.mInputMode);
}
if(this.mSoftInputMode != -1) {
mPopupWindow.setSoftInputMode(this.mSoftInputMode);
}
if(this.mOnDismissListener != null) {
mPopupWindow.setOnDismissListener(this.mOnDismissListener);
}
if(this.mOnTouchListener != null) {
mPopupWindow.setTouchInterceptor(this.mOnTouchListener);
}
mPopupWindow.setTouchable(this.mTouchable);
}
示例3: showPopUpWindow
import android.widget.PopupWindow; //导入方法依赖的package包/类
private void showPopUpWindow(View view) {
WindowManager systemService = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);
int width = systemService.getDefaultDisplay().getWidth();
int height = systemService.getDefaultDisplay().getHeight();
int popWidth = (int) (width * 0.75);
int popHeight = (int) (height * 0.64);
PopupWindow popupWindow = new PopupWindow(this);
popupWindow.setWidth(popWidth);
popupWindow.setHeight(popHeight);
View inflate = LayoutInflater.from(this).inflate(R.layout.ll_life_detail_pop,null);
popupWindow.setContentView(inflate);
popupWindow.setClippingEnabled(false);//设置覆盖状态栏,重点
popupWindow.setBackgroundDrawable(getResources().getDrawable(R.drawable.rl_pop_top_corner));
popupWindow.setOutsideTouchable(false);
popupWindow.setFocusable(true);
popupWindow.showAtLocation(view, Gravity.CENTER,0,0);
initPopUpView(inflate);
}
示例4: CursorHandle
import android.widget.PopupWindow; //导入方法依赖的package包/类
public CursorHandle(boolean isLeft) {
super(mContext);
this.isLeft = isLeft;
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setColor(mCursorHandleColor);
mPopupWindow = new PopupWindow(this);
mPopupWindow.setClippingEnabled(false);
mPopupWindow.setWidth(mWidth + mPadding * 2);
mPopupWindow.setHeight(mHeight + mPadding / 2);
invalidate();
}
示例5: startShowDialog
import android.widget.PopupWindow; //导入方法依赖的package包/类
private void startShowDialog() {
View popMenuView = activity.getLayoutInflater().inflate(R.layout.dialog, null);
RealTimeBlurView blur_view = (RealTimeBlurView) popMenuView.findViewById(R.id.blur_view);
float v = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 15, activity.getResources().getDisplayMetrics());
blur_view.setBlurRadius(v);
final PopupWindow popMenu = new PopupWindow(popMenuView, RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT, true);
popMenu.setClippingEnabled(false);
popMenu.setFocusable(true); //点击其他地方关闭
popMenu.setAnimationStyle(R.style.main_menu_animstyle);
popMenu.showAtLocation(popMenuView, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0);
}