Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create a <code>CheckBox</code> with no text and add two <code>TextView</code>s next to it. The first is a <em>non-clickable</em> view with text like "I have read and agree to the ". The second is a <em>clickable</em> view with text like "TERMS AND CONDITIONS". Place the <code>TextView</code>s side by side without any margin. Notice the extra space in the end of the first view for natural text alignment. This way you could style both texts as you like.</p> <p>Sample xml code:</p> <pre class="lang-java prettyprint-override"><code>&lt;RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;CheckBox android:id="@+id/terms_check" android:text="" android:layout_marginLeft="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt; &lt;TextView android:id="@+id/terms_text" android:layout_toRightOf="@id/terms_check" android:text="I have read and agree to the " android:layout_marginLeft="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt; &lt;TextView android:id="@+id/terms_link" android:layout_toRightOf="@id/terms_text" android:text="TERMS AND CONDITIONS" android:textColor="#00f" android:onClick="onClick" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt; &lt;/RelativeLayout&gt; </code></pre> <p><br/> Then add an <code>onClick()</code> handler in the code. Voilá.</p> <pre><code>public class SignUpActivity extends Activity { public void onClick(View v) { ... } } </code></pre>
    singulars
    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. 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.
 

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