Trying to set a custom view for my actionbar, but have the problem that it doesn\'t fill up the entire width of the actionbar which makes it har for me to center objects. Ho
You have to set android:layout_width="wrap_content" for your RelativeLayout in your actionbar_layout.xml; this, in conjunction with android:layout_gravity="center", allows to center your custom view in the ActionBar.