本文来自http://blog.csdn.net/hellogv/ ,引用必须注明出处!
main.xml的源码如下:
- <?xml
version="1.0" encoding="utf-8"?> - <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" -
android:orientation="vertical" -
android:layout_width="fill_parent" -
android:layout_height="fill_parent" -
> - <Button
android:id="@+id/Button01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="PopupWindow演示"></Button> - </LinearLayout>
下图是PopupWindow弹出的截图,这里的PopupWindow是个登录框,点“确定”则自动填写,点“取消”则关闭PopupWindow。
popupwindow.xml的源码: