我正在尝试创建一个聊天气泡,其中包含一些文本。为此,我创建了三个布局,在主线性布局内部使用FramLayout,将一个9-patch背景设置为该Framlayout。在Framlayout内部,我添加了另一个RelativeLayout,其中放置了我的三个TextView和一个ImageView,但是当类型为长文本时,它会超出FramLayout边框。我不知道我做错了什么或者我漏掉了什么。当我使用小文本时,它仍适合,但是使用大文本时,它甚至从FramLayout的背景边框中出现。在附件中,我展示了我的气泡和Yahoo IM气泡。我正在尝试创建与Yahoo相同但具有不同风格的气泡,请给我建议。我用不同的方法尝试了很多次,但没有成功。谢谢。
![enter image description here](https://istack.dev59.com/kazof.webp)
<?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="wrap_content"
android:orientation="horizontal"
android:id="@+id/linearListLayout1">
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bubbleblue" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minHeight="100dp">
<TextView
android:id="@+id/chattitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"/>
<TextView android:id="@+id/chatdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"/>
<TextView android:id="@+id/chatText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/chatstatus"
android:layout_below="@+id/chattitle"
android:layout_toLeftOf="@+id/chatstatus"
android:text="TextView" />
<ImageView
android:id="@+id/chatstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/add_picture"
android:layout_alignParentRight="true"
android:layout_below="@+id/chatdate"
android:minHeight="2dip"
android:maxWidth="2sp"
android:maxHeight="2sp"
android:layout_marginRight="2dp"/>
</RelativeLayout>
</FrameLayout>