Search code examples
javaandroidandroid-actionbarandroid-custom-view

Customise Actionbar how can i achive?


i want to show two images in action bar without listing in menu.xml file means i want to customise with image button or button and i want to set background color in action bar i want to try with onCreateActionView() this method can any one provide me deep knowledge ?


Solution

  • design a layout as per your need and use the code

    actionBar.setCustomView(R.layout.test_action);

    and u can use the buttons or images by finding its id from the action bar.