How to align CheckBox to the top of its description in Android

android:gravity="top" will fix the problem:

<CheckBox android:id="@+id/register_checkbox"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/register_hint"
          android:gravity="top"/>

Note that android:gravity is different than android:layout_gravity.


  • use

    android:gravity="top" it will pin the box on top

  • use

    padding_top="4dp" will adjust Text padding only (without changing box padding from top)