I apply a custom View
to the ActionBar
, like this
// Inflate the \"Done/Discard\" custom ActionBar view.
LayoutInflater inflater = (La
ActionBar actionbar;
actionbar = getActionBar();
Button cls = (Button)findViewById(R.id.btn_close);
cls.setOnClickListener(new OnClickListener(){
public void onClick(View view){
actionbar.setDisplayShowCustomEnabled(false);
}
});
Note: The button with id 'btn_close' was located in the custom actionbar layout.This function was written in mainactivity.
Hope this Helps!!