I want to display an Action Bar with a custom layout. The custom layout has three ImageViews, one in the centre and the other two on the left & right ends of the action
In my case I have solved the issue bypassing the invocation of the LayoutInflater
.
So one should simply replace this code:
View actionBarView = LayoutInflater.from(this).inflate(R.layout.custom_actionbar, null);
actionBar.setCustomView(actionBarView, lp);
with this code:
actionBar.setCustomView(R.layout.custom_actionbar);