I have few TextViews with drawable icons on left side. layout:
<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:
If the text is too big, icon stand in the center of textview. I want to set icon aligned top of textview. Is it possible?