View wallpapers around another view

Is there a way to make my textview wrap around other views? For example, in the picture, is there any way to make it turn to the edge when it is below the image?

alt text

This is my xml

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/white"> <LinearLayout android:id="@+id/AUTHOR_TITLE" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentTop="True"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dip" android:text="Author Name" /> </LinearLayout> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/AUTHOR_TITLE"> <ImageView android:id="@+id/PICTURE" android:layout_alignParentLeft="True" android:layout_alignParentTop="True" android:src="@drawable/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/DESCRIPTION" android:layout_toRightOf="@id/PICTURE" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF OMGTESTLOLWTF "/> </RelativeLayout> </RelativeLayout> 

I am really surprised that no one has done this yet = \ Sigh.

+4
source share
2 answers

This is currently not possible with built-in widgets. You can roll on your own, it should not be too difficult. You will need to expand one of the ViewGroup classes and add images and text to it. Then in onLayout() you can figure out how to pass the text so that it wraps the images.

+3
source

Check out this library. FlowTextView https://github.com/deano2390/FlowTextView

0
source

All Articles