【发布时间】:2017-02-07 12:47:29
【问题描述】:
【问题讨论】:
-
是的,它的设计有点混乱。
标签: android android-layout android-imageview textview
【问题讨论】:
标签: android android-layout android-imageview textview
你试过FlowTextView
将您的子视图添加到您的 XML 布局中:
<uk.co.deanwild.flowtextview.FlowTextView
android:id="@+id/ftv"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="10dip"
android:src="@drawable/android"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="400dip"
android:padding="10dip"
android:src="@drawable/android2"/>
</uk.co.deanwild.flowtextview.FlowTextView>
FlowTextView flowTextView = (FlowTextView) findViewById(R.id.ftv);
Spanned html = Html.fromHtml("<html>Your html goes here....");
flowTextView.setText(html);
编译'uk.co.deanwild:flowtextview:2.0.2'
输出:
享受……
【讨论】:
compile 'uk.co.deanwild:flowtextview:2.0.2' 可以使用找到gradle依赖:gradleplease.appspot.com/#FlowTextView