Android and android Official Website
TextView add Image
Address: http://blog.csdn.net/caroline_wendy
Android UI designInAdd image around text.
A simple method is to directly useLayoutCombine views:
<ImageView android:layout_width=“wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon_home_askdoc" android:scaleType="fitXY" android:layout_above="@+id/asking_doctor" android:layout_centerHorizontal="true"/>
ImageView, adaptive image size, fill"
ScaleType: fitXY", Horizontally centered View"
CenterHorizontal: true".
You can also add the image (drawable) directly around the TextView ):
<TextView style="@style/HomepageGridMenuTextStyle" android:drawablePadding="8dp" android:drawableTop="@drawable/icon_home_avatar" android:text="@string/home_avatar"/>
TextView,
DrawableTopAdd an image to the text,
Unable to adjust image attributes.