title: Create layout custom title
body: <p>I want to create an android interface, something like a launcher. For this, I need to make a custom title bar and 2 borders in each side of the screen.</p>
  <p>I have several activities in my app, and I need this to be in all of them, so I need to create independent layouts, one with the custom titlebar and another with the borders. The result may be this:</p>
  <p><a href="https://i.stack.imgur.com/4NJkc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4NJkc.png" alt="draw" /></a></p>
  
  <p>This is the xml for the borders:</p>
  <pre><code>&lt;RelativeLayout 
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; 
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;
  android:orientation=&quot;horizontal&quot;&gt;
  
  &lt;RelativeLayout   
      android:id=&quot;@+id/border_left&quot;
      android:layout_width=&quot;100dip&quot;
      android:layout_height=&quot;fill_parent&quot;
      android:orientation=&quot;vertical&quot;
      android:layout_alignParentLeft=&quot;true&quot;
      android:background=&quot;#000000&quot; &gt;
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id=&quot;@+id/border_right&quot;
      android:layout_width=&quot;100dip&quot;
      android:layout_height=&quot;fill_parent&quot;
      android:orientation=&quot;vertical&quot;
      android:layout_alignParentRight=&quot;true&quot;
      android:background=&quot;#000000&quot; &gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is the xml for the tittle:</p>
  <pre><code>&lt;LinearLayout
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  android:id=&quot;@+id/title&quot;
  android:layout_width=&quot;fill_parent&quot;
  android:layout_height=&quot;26dip&quot;
  android:orientation=&quot;horizontal&quot;
  android:background=&quot;#000000&quot; &gt;
  </code></pre>
  
  <p>The questions are 2:</p>
  <ul>
  <li><p>How can I put in the middle of the titlebar (the red square) a logo (image)?</p>
  </li>
  <li><p>How can I insert these 2 layouts into the other activities? For example, how could I make my plain main layout include these 2 layouts?</p>
  </li>
  </ul>