我想在ListActivity内的某个按钮中包含CustomTitle栏。 直到现在,我成功地用一些按钮显示标题栏。 但我无法处理点击这些按钮的事件。 以下是我的代码:ListActivtiy中的自定义标题栏按钮
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);
}
}
}
当我添加了clickListener它给人的按键我错误
The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new DialogInterface.OnClickListener(){})
我认为它是因为我对ListActivity
不同的监听器,并可能导致其相互矛盾与这一个。也可以在OnResume
方法中定义它吗?
有没有解决方法?
在此先感谢。