getSupportActionBar() is giving error because class not extended from ActionBarActivity / AppCompatActivity .
I have tried with getActionBar() but not working .
Is it possible to get Action Bar without extending ActionBarActivity / AppCompatActivity ?
My code :- Here is my Class
public class MainActivity extends BaseActivity implements CallBackListener {
And here is the code where i need to use getSupportActionBar() method , but it is giving error :-
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
getSupportActionBar().getCustomView().findViewById(R.id.menu_icon)
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
toggle();
}
});