Custom Title Bar Button in ListActivtiy
<p>I want to have an CustomTitle bar with some buttons in it within the ListActivity.
Uptill now I am successful in displaying the title bar with some buttons.
But I cannot handle the event of click on those buttons.
Following is my code:</p>

<pre><code>import android.content.DialogInterface.OnClickListener;

public class ProfileListView extends ListActivity {

    boolean done;

    @Override
    protected void onResume() {
        super.onResume();
        System.out.println("OnResume ProfileListView");
        this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.profile_list);
        this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.maintitlebar);


        }
}
}
</code></pre>

<p>When I add the clickListener for the button it gives me error </p>

<pre><code>The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new DialogInterface.OnClickListener(){})
</code></pre>

<p>I think its because of I have a different Listener for the <code>ListActivity</code> and might be its conflicting with this one. Also can it be defined in the <code>OnResume</code> method?</p>

<p>Is there any solution with this?</p>

<p>Thanks in advance.</p>
