how we can design imageView in corner of textView in android? [duplicate]

若如初见. 提交于 2020-01-04 18:30:06

问题


I am new in android so I am confuse in this design so please help me. I want to design this type


回答1:


Have you tried FlowTextView

How to use

Add to your XML layout with your child views inside it:

<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>

Then in your code:

    FlowTextView flowTextView = (FlowTextView) findViewById(R.id.ftv);
    Spanned html = Html.fromHtml("<html>Your html goes here....");
    flowTextView.setText(html);

Add the dependency:

compile 'uk.co.deanwild:flowtextview:2.0.2'

Output:

Enjoy...



来源:https://stackoverflow.com/questions/42090299/how-we-can-design-imageview-in-corner-of-textview-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!