我正试着做一个聊天泡泡。所以我试着做了一个9补丁图像,但它没有自动拉伸。这是我的9张补丁图片,
这是我的聊天泡泡的XML文件。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bubblee"
>
<TextView
android:id="@+id/txt_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="300dp"
android:padding="5dp"
android:textColor="#000000"
tools:text="lol" />
</RelativeLayout>这就是当前聊天泡沫的样子,
我想我以前从来没有做过9补丁映像,所以问题是9补丁映像,如果我犯了什么错误,请告诉我:
谢谢:3
发布于 2017-01-06 17:39:50
您已经为您的图像保留了很大的宽度,因此默认情况下,它将占用很大的宽度。
试着用宽度来制作小图像,然后检查它是否有效。
https://stackoverflow.com/questions/41510296
复制相似问题