title: Customize ActionBar, only some items custom views
body: <p>I've read about the ActionBar and tried some stuff. I've come to the point where I replace the ActionBar with a custom view like this:</p>
  
  <pre><code>getSupportActionBar().setCustomView(R.layout.actionbar_timer);
  </code></pre>
  
  <p>but some of the icons are too big, and it's not really how I want it to be, there is a huge padding to the right (to the options menu icon).</p>
  
  <p>So this is what my actionbar_timer layout looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res/de.myapp"
      android:layout_width="fill_parent"
      android:layout_height="match_parent"
      android:layout_gravity="fill_horizontal"
      android:background="#000"
      android:focusable="true"&gt;
  
      &lt;ImageView
          android:id="@+id/actionbar_back"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:paddingTop="8dp"
          android:paddingBottom="8dp"
          android:paddingLeft="10dp"
          android:src="@drawable/icon_actionbar_back" /&gt;
  
  
      &lt;ImageView
          android:id="@+id/actionbar_moon"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:paddingTop="10dp"
          android:paddingBottom="10dp"
          android:src="@drawable/icon_actionbar_moon" /&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:paddingTop="15dp"
          android:paddingBottom="15dp"
          android:layout_marginRight="5dp"
          android:layout_alignParentTop="true"
          android:layout_toLeftOf="@+id/actionbar_timer"
          android:src="@drawable/icon_actionbar_clock" /&gt;
  
      &lt;ImageView
          android:id="@+id/actionbar_icon"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_alignParentTop="true"
          android:layout_toRightOf="@+id/actionbar_back"
          android:paddingBottom="10dp"
          android:paddingTop="10dp"
          android:src="@drawable/icon_actionbar_something" /&gt;
  
      &lt;de.myapp.views.TextViewPlus
          android:id="@+id/actionbar_timer"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_alignParentTop="true"
          android:layout_toLeftOf="@+id/actionbar_moon"
          android:gravity="center|center"
          android:text="00:00:00"
          android:textColor="#FFFFFF"
          android:textSize="20sp"
          app:customFont="roboto_regular.ttf" /&gt;
  
      &lt;View
          android:background="#33b5e5"
          android:layout_height="1.5dp"
          android:layout_alignParentBottom="true"
          android:layout_width="fill_parent"
  
         /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>So I've set alignParentRight="true" at the right-most elements of my layout, but there still is a big gap between the views and the options menu icon.</p>
  
  <p>Is there a way to reduce this gap? Also, I had to "recreate" the blue line on bottom of the ActionBar with the View-stub at the end of the layout. How can I avoid this? I'm using ActionBarSherlock, by the way.</p>