Note that there are some explanatory texts on larger screens.

plurals
  1. POActionbar with custom layout show me icon
    text
    copied!<p>I have a actionbar with a custom layout, but this show me the icon at right i set false the texttitle, description and uselogo.</p> <p>Photo:</p> <p><a href="http://img155.imageshack.us/img155/6742/sinttulozmk.png" rel="nofollow noreferrer">a busy cat http://img155.imageshack.us/img155/6742/sinttulozmk.png</a></p> <p>This is my code:</p> <pre><code> // Gestion del ActionBar y contexto ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayUseLogoEnabled(false); actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setDisplayShowCustomEnabled(true); View cView = getLayoutInflater().inflate(R.layout.actionbar, null); actionBar.setCustomView(cView); </code></pre> <p>This is the actionbar.xml, only have a image, 2 textview and other image.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;RelativeLayout android:layout_width="wrap_content" android:layout_height="54dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:background="@drawable/header_bg" &gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginBottom="10dp" android:layout_marginLeft="100dp" android:text="Nº de Usuario: " android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/blanco" android:textSize="12sp" android:shadowColor="#232323" android:shadowDx="0" android:shadowDy="-1"/&gt; &lt;TextView android:id="@+id/tvABCodigoUsuario" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/textView1" android:layout_alignBottom="@+id/textView1" android:layout_toRightOf="@+id/textView1" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/blanco" android:textSize="12sp" android:shadowColor="#232323" android:shadowDx="0" android:shadowDy="-1"/&gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:src="@drawable/header_logo" android:layout_marginLeft="14dp"/&gt; &lt;ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:src="@drawable/header_bt_off" android:layout_marginRight="14dp"/&gt; &lt;TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/textView1" android:layout_alignLeft="@+id/textView1" android:paddingRight="9dp" android:text="Nombre: " android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/blanco" android:textSize="12sp" android:layout_marginLeft="45dp" android:layout_marginBottom="1dp" android:shadowColor="#232323" android:shadowDx="0" android:shadowDy="-1"/&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>I use actionbar sherlock and 2.3</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload