android PopupWindow demo
来源:互联网 发布:淘宝特百惠官方旗舰店 编辑:程序博客网 时间:2024/06/06 04:51
public class PopupwindowActivity extends Activity {
LinearLayout ll;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ll = (LinearLayout) findViewById(R.id.container);
}
public void click(View view){
TextView tv = new TextView(this);
tv.setTextSize(20);
tv.setText("哥是弹出窗体");
tv.setTextColor(Color.RED);
//PopupWindow popupWindow = new PopupWindow(tv, 100, 100);
PopupWindow popupWindow = new PopupWindow(tv, 100, 100, true);
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
popupWindow.showAtLocation(ll, Gravity.LEFT | Gravity.TOP, 50,100);
}
}
LinearLayout ll;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ll = (LinearLayout) findViewById(R.id.container);
}
public void click(View view){
TextView tv = new TextView(this);
tv.setTextSize(20);
tv.setText("哥是弹出窗体");
tv.setTextColor(Color.RED);
//PopupWindow popupWindow = new PopupWindow(tv, 100, 100);
PopupWindow popupWindow = new PopupWindow(tv, 100, 100, true);
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
popupWindow.showAtLocation(ll, Gravity.LEFT | Gravity.TOP, 50,100);
}
}
0 0
- android PopupWindow demo
- android PopupWindow重写系统菜单Demo
- 【Android开发日记】Popupwindow 完美demo
- 第十章,PopupWindow简易demo(Android)
- Android PopupWindow显示在控件上方或者下方(demo)
- Android封装之PopupWindow(一) (带demo)
- PopupWindow小Demo
- PopupWindow弹窗demo
- Popupwindow 完美demo
- Android-Popupwindow
- android PopupWindow
- android PopupWindow
- PopupWindow Android
- Android PopupWindow
- android popupwindow
- Android PopupWindow
- Android-PopupWindow
- android popupwindow
- C++中的关键字
- 修改eclipse中xml文件里面的属性值为非斜体字
- Visual C++ 6.0如何配置文件以及无法使用配置文件(Profile)的解决方案
- prim算法,可读取文件
- TextView
- android PopupWindow demo
- linux下eclipse hadoop插件配置
- 通过iPXE引导Windows安装
- 第11周 项目2-2 四数的最大公约数
- iOS DES加密与3DES加密
- 第11周项目--反序数
- Ogre 代码结构, 阅读代码顺序, 读吧,兄弟.
- IE、Chrome兼容Enter事件
- 网络编程学习(四)