前些天在国外的一个网站上看到了文本环绕图片的一篇文章,所以今天就抽时间整理了一下。
顺便说下Android的Spans真的太强大了,这里提供一个关于Spans的链接,大家有时间可以看下,真的非常强大。
首先看下页面布局:
<ScrollView 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">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="