Android:PopupWindow中的SurfaceView

时间:2012-11-03 16:43:37

标签: java android surfaceview popupwindow

是否可以在SurfaceView内显示PopoupWindow

使用此PopupWindow的XML:

<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:padding="10dip"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#444444"
    >
    <SurfaceView
        android:layout_width="100px"
        android:layout_height="100px"
    />
</LinearLayout>

弹出窗口不起作用,并生成以下日志消息:

W/WindowManager(   60): Attempted to add window with token that is a sub-window: android.os.BinderProxy@4058e3c8.  Aborting.

使用View代替SurfaceView可以正常使用。


修改 似乎使用平台2.3.3存在问题,但使用平台4.1都可以正常工作。我没有用其他平台版本测试它。

0 个答案:

没有答案