Я хочу иметь отступы между текстом описания и переключателем, но свойство paddingRight не работает. Зачем?Android: Padding не работает в RelativeLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/layoutLayout"
android:layout_below="@+id/layoutHeader"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/widgetShortSwitch"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is a long description text that should not overlay."
android:textColor="#000000"
android:paddingRight="15dp"
android:id="@+id/widgetShortTextView"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
/>
</RelativeLayout>
Awesome. Когда вы добавляете единицы «dp» к вашим макетам, это идеально. – Kewitschka