То, что я пытаюсь сделать, это обернуть текстовое изображение вокруг изображения, чтобы текст не был только с левой или с правой стороны изображения. Можно ли это сделать через XML? Поскольку это всплывающее диалоговое окно с рисунком, поэтому делать это через код будет больно, поскольку это несколько изображений в зависимости от того, что они нажимают. См. Рисунок, например.Android Textview wrap imageview
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@android:color/background_light">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="1dp"
android:background="@android:color/darker_gray">
>
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="20dp">
<Button
android:id="@+id/dismiss"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Close" />
<ImageView
android:id="@+id/IV1"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/IV1"
android:layout_below="@+id/dismiss"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/TV15"
android:id="@+id/TV15"
android:layout_below="@+id/dismiss"
android:layout_toRightOf="@+id/IV1"
android:layout_toEndOf="@+id/IV1"
android:paddingLeft="5dp"
android:paddingTop="5dp"/>
</RelativeLayout>
</ScrollView>
</LinearLayout>
Я не хочу, чтобы они были друг на друга, хотя, см. Рисунок, который я только что опубликовал, для большего количества примеров того, что я пытаюсь сделать. – Jayce
Я неправильно понял вашу проблему, этот проект может помочь вам https://github.com/deano2390/flowtextview –