从屏幕底部弹出PopupWindow

最近因为要用到PopupWindow,所以,就在网上搜索了一下,发现挺多关于这样的文章,现在我把它们整理了一下。

  1、Android PopupWindow 的使用技巧,http://www.cnblogs.com/sw926/p/3230659.html

2、Android PopupWindow 的使用和分析,http://www.cnblogs.com/mengdd/p/3569127.html

3、Android PopupWindow 实现从底部弹出或滑出选择菜单或窗口,http://104zz.iteye.com/blog/1685389


     本文是整理上面三篇文章而成,绝大部分代码是使用第三篇的,如有不妥,请联系。


     一、第一步就是创建布局文件

       res/layout/finish_project_popupwindow.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <Button
        android:id="@+id/popupwindow_Button_saveProject"
        android:layout_marginLeft="20dip"  
        android:layout_marginRight="20dip"  
        android:layout_marginTop="10dip" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/popupwindow_Button_saveProject" />

    <Button
        android:id="@+id/popupwindow_Button_abandonProject"
        android:layout_marginLeft="20dip"  
        android:layout_marginRight="20dip"  
        android:lay
  • 5
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值