Thursday 15 March 2012

java - android custom actionbar onclicklistener -


I have set up a custom taskbar like this

  last actionbear actionbars = getSupportActionBar () ; . GetSupportActionBar () setDisplayOptions (ActionBar.DISPLAY_SHOW_CUSTOM); GetSupportActionBar () setCustomView (R.layout.custom_layout). SetContentView (R.layout.activity_main); . GetSupportActionBar () setBackgroundDrawable (getResources () getDrawable (R.drawable.actionbar_bg).);   

My custom_outout includes an image button so that I can attack a click listener on that button.

There is a scene in the form of actionbars, I think that you Call FindViewById Then you can possibly attach to oncliclestner normally.

No comments:

Post a Comment