java - ActionBar onClick listener- this is possible? -


how actionbar onclick listener? mean- global listener whole view, not actionbar child views

try use custom view.

  1. create layout want action bar

  2. add android:onclick attribute in xml

    android:onclick="handleclick"

  3. inflate somewhere in code

  4. use actionbar.setcustomview() method

  5. implement onclick method in java

    public void handleclick(view view) {     // code after click here } 

that should work !


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -