Ich habe einige TextViews mit Zeichen auf der linken Seite. Layout:TextView set DrawableRight/Left ... Ausrichtung
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/card_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/detail_padding">
<TextView
android:id="@+id/location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/title_margin"
android:drawableLeft="@drawable/ic_location"
android:drawablePadding="@dimen/drawable_padding"
android:drawableStart="@drawable/ic_location" />
<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/title_margin"
android:drawableLeft="@drawable/ic_status"
android:drawablePadding="@dimen/drawable_padding"
android:drawableStart="@drawable/ic_status"/>
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/title_margin"
android:drawableLeft="@drawable/ic_description"
android:drawablePadding="@dimen/drawable_padding"
android:drawableStart="@drawable/ic_description"/>
</LinearLayout>
</android.support.v7.widget.CardView>
Screenshot:
Wenn der Text zu groß ist, steht Symbol in der Mitte der Textview. Ich möchte das Symbol oben auf Textansicht ausrichten. Ist es möglich?
posten Sie Ihre vollständigen xml Layout – Jeevanandhan
Ich schlage vor, Sie auf diesen Link Antwort zu sehen ist hier http://stackoverflow.com/questions/10267352/align-top-of-image-to-top-of-textview/28906636 # 28906636] [1] –
Ich möchte Zeichensatz auf die linke obere Kante von Textansicht –