1

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   

    }
    });
Muhammad Farhan Habib
  • 1,859
  • 20
  • 23

1 Answers1

1

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

Muhammad Farhan Habib
  • 1,859
  • 20
  • 23