PopupWindow学习总结
来源:互联网 发布:protobuf java any 编辑:程序博客网 时间:2024/05/28 15:07
PopupWindow学习总结
经过一段时间的学习,了解了PopupWindow的基本用法,如下:
1、为PopupWindow的view布局,通过LayoutInflator获取布局的view.如:
LayoutInflater inflater =(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View textEntryView = inflater.inflate(R.layout.paopao_alert_dialog, null);
2、显示位置,可以有很多方式设置显示方式
pop.showAtLocation(findViewById(R.id.ll2), Gravity.LEFT, 0, -90);
3、进出场动画
pop.setAnimationStyle(R.style.PopupAnimation);
4、点击PopupWindow区域外部,PopupWindow消失
this.window = new PopupWindow(anchor.getContext());
this.window.setTouchInterceptor(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_OUTSIDE) {
BetterPopupWindow.this.window.dismiss();
return true;
}
return false;
}
});
- PopupWindow学习总结
- PopupWindow学习总结
- PopupWindow总结
- PopupWindow总结
- PopupWindow学习
- PopupWindow学习
- PopupWindow学习
- PopupWindow使用总结:
- 使用PopupWindow总结
- Android总结之PopupWindow
- PopupWindow使用总结
- Android PopupWindow使用总结
- Android PopupWindow使用总结
- 下拉菜单 spinner ,popupwindow, 自定义popupwindow总结
- 学习笔记 popupwindow
- PopupWindow学习大全
- android学习之popupWindow
- Android学习之PopupWindow
- Alterdialog和RadioGroup的使用
- 2011年软考系统架构设计师学习笔记第十二章
- Oracle中SQL语句解析的步骤
- AMCharts在Flex下的使用
- android 获取坐标
- PopupWindow学习总结
- extremeQoS限速
- 2011年软考系统架构设计师学习笔记第十三章
- iphone直播的实现
- Pro*c源程序中使用宿主结构保存查询结果
- Android中的XML文件的作用介绍
- C语言编译全过程
- Java Thread 多线程 线程池
- Linux Socket通信 C/S模型