Android - NullPointer exception in Dialog with RadioButtons
<p>Can anyone help me with this and tell me where I do the mistake... When I try to do anything with the radiobutton Eclipse throws me this exception</p>

<pre><code>threadid=1: thread exiting with uncaught exception (group=0x40015560)
FATAL EXCEPTION: main
java.lang.NullPointerException
cz.nasdaq.RbtnActivity$1.onClick(RbtnActivity.java:36)
android.view.View.performClick(View.java:2485)
android.view.View$PerformClick.run(View.java:9080)
android.os.Handler.handleCallback(Handler.java:587)
android.os.Handler.dispatchMessage(Handler.java:92)
android.os.Looper.loop(Looper.java:123)
.
.
.
</code></pre>

<p>with this code</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button btn = (Button)findViewById(R.id.btn1);        
        btn.setOnClickListener(new OnClickListener() {

            public void onClick(View arg0) {
                final Dialog dialog = new Dialog(RbtnActivity.this);
                dialog.setContentView(R.layout.dlg);
                dialog.show();

                RadioButton drb0=(RadioButton)findViewById(R.id.DialogRb0);
                drb0.setChecked(true);
</code></pre>
