开发者

Add Adwhirl in Dialog causes Inflate Exception

i get an Inflate Exception, android.view.InflateException: Binary XML file line #76: Error inflating class, while adding AdWhirl Layout in the XML and set this XML as Content-View of the Dialog, i don't know why this exception is occurring and how to resolve it please guide me to solve this issue, i think following code will help u to diagnose that where problem resides:

This is my XML, where i have added Adwhirl layout:

<LinearLayout
            android:id="@+id/LinearLayout04"
            android:layout_marginBottom="20dip"
            android:gravity="center"
            android:layout_height="250dip"
            android:layout_gravity="center"
            android:layout_width="fill_parent"
        >

        <com.adwhirl.AdWhirlLayout <!-- Exception occurred on this line--> 
                android:id="@+id/adwhirl_layout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />                 
        </LinearLayout>

And in the Java Code:

runOnUiThread(new Runnable() {  
    @Override   

     public void run() {

        isShowed = true;
        dialog = new Dialog(getApplicationContext()); 

        dialog.setContentView(R.layout.replay_screen);//Exception occurred on this line   

    }
    }开发者_如何学C);


I have resolved this issue as now i am adding AdWhirl View by Code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜