Stworzyłem bardzo prosty układ: „Na odkształcalne być sporządzony na początku tekstu”Dlaczego zachowanie drawableStart nie pasuje do dokumentacji systemu Android?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button"
android:drawableStart="@drawable/ic_launcher" />
</LinearLayout>
</RelativeLayout>
według the documentation for drawableStart
,
Jednak, gdy działa na moim telefonie z Androidem 4.0.4, I zamiast zobaczyć:
Dlaczego jest taka duża różnica między ikoną a tekstem? Zgodnie z this answer,
"W systemie Android 4.0 (poziom API 14) można użyć atrybutu android: drawableStart do umieszczenia losowania na początku tekstu."
Ale to nie jest zachowanie, które obserwuję. Dlaczego atrybut nie działa?
Docs powiedzieć dodano API 17 – speedynomads