I want to make custom action bar by put ImageView
in the middle and have another icon with some info on the right side of actionbar like this:
ActionBar has customView support. Do not use onCreateOptionsMenu()
and R.menu.actionbar_right_icon
. Instead create a layout that takes all of the views you have draw.
You can do it like below
LayoutParams layout_params = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
getSupportActionBar().setCustomView(custom_view, layout_params);