2010-10-06 17 views
0

UPDATE:得到了谷歌的答覆是 這是不可能的: http://code.google.com/p/android/issues/detail?id=11752&can=1&q=videoview&colspec=ID%20Type%20Status%20Owner%20Summary%20StarsVideoView一個Widget裏面 - 讓android.view.InflateException:二進制XML

這應該是最簡單的的東西,但我無法讓它運行。 下面的XML佈局會導致錯誤膨脹AppWidget AppWidgetProviderInfo例外:

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

    <VideoView 
android:layout_height="fill_parent" 
android:layout_width="fill_parent" 
android:id="@+id/VideoView"></VideoView> 
</LinearLayout> 

我在做什麼錯在這裏? 我甚至想過在運行時動態地將VideoView添加到LinearLayout中,但是失敗了,所以如果任何人有關於如何做到這一點的想法 - 那將非常棒!

回答

相關問題