title: java.lang.RuntimeException: Could not initialize AdView: AdView was initialized with a Context that wasn't an Activity
body: <p>I have implemented admob in my activity. it is working fine . i want to use it in customized dialog box. But it give the run time exception.i.e</p>
  
  <p><code>09-19 15:55:19.519: E/AndroidRuntime(7050): android.view.InflateException: Binary XML file line #7: Error inflating class &lt;unknown&gt;
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.createView(LayoutInflater.java:626)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:855)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:751)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.app.Dialog.setContentView(Dialog.java:480)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.burble.JoinLoadActivity.addjumper(JoinLoadActivity.java:663)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.burble.JoinLoadActivity.onClick(JoinLoadActivity.java:342)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.View.performClick(View.java:4658)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.View$PerformClick.run(View.java:19461)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.os.Handler.handleCallback(Handler.java:733)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.os.Handler.dispatchMessage(Handler.java:95)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.os.Looper.loop(Looper.java:146)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.app.ActivityThread.main(ActivityThread.java:5653)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at java.lang.reflect.Method.invoke(Method.java:515)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at dalvik.system.NativeStart.main(Native Method)
  09-19 15:55:19.519: E/AndroidRuntime(7050): Caused by: java.lang.reflect.InvocationTargetException
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at java.lang.reflect.Constructor.constructNative(Native Method)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at android.view.LayoutInflater.createView(LayoutInflater.java:600)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     ... 22 more
  09-19 15:55:19.519: E/AndroidRuntime(7050): Caused by: java.lang.RuntimeException: Could not initialize AdView: AdView was initialized with a Context that wasn't an Activity.
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.google.ads.AdView.a(SourceFile:402)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.google.ads.AdView.&lt;init&gt;(SourceFile:125)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     ... 25 more
  09-19 15:55:19.519: E/AndroidRuntime(7050): Caused by: com.google.ads.internal.b: AdView was initialized with a Context that wasn't an Activity.
  09-19 15:55:19.519: E/AndroidRuntime(7050):     at com.google.ads.AdView.a(SourceFile:389)
  09-19 15:55:19.519: E/AndroidRuntime(7050):     ... 26 more
  </code></p>
  
  <p>can anyone help me on this. Thanks in advance!</p>