Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Customizig window (and thus also dialog) titles can be done by requesting the window feature CUSTOM_TITLE, which must be done before setContentView.</p> <p>So in your Dialog / Activity subclasses onCreate(), call the following:</p> <pre><code>super.onCreate(savedInstance); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); // &lt;- insert this </code></pre> <p>Then, <strong>after</strong> your setContentView, do this:</p> <pre><code>setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); // &lt;- insert this </code></pre> <p>The layout can generally contain anything you want. For a marquee text control. e.g. do this:</p> <p>layout/custom_title.xml:</p> <pre><code>&lt;FrameLayout android:id="@+id/FrameLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;TextView android:id="@+id/caption_text" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="This is a very very long text that will not fit into a caption regularly, so it will be displayed using marquee..." android:lines="1" android:focusable="true" android:focusableInTouchMode="true" android:scrollHorizontally="true" android:marqueeRepeatLimit="marquee_forever" android:ellipsize="marquee" &gt;&lt;/TextView&gt; &lt;/FrameLayout&gt; </code></pre> <p>Due to some constraints with the marquee feature, the text view has to be made focusable and it will only be scrolling when focused (which it initially should be).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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