android xml png,android - 使用.png文件中的形状创建xml聊天气泡 - 堆栈内存溢出
請問是否有人知道如何在下面創建聊天氣泡的xml形狀? 我在網上找到的唯一示例是兩個單獨的形狀,它們在布局中作為兩個單獨的背景放置-三角形和矩形。 我嘗試將三角形和矩形組合在一起無濟于事。 三角形似乎隱藏在矩形中。 將三角形的top屬性設置為向下移動會使ImageView對象為空白。
請查看我嘗試過的內容:
android:shape="rectangle">
android:width="106dp"
android:height="20dp"/>
android:width="1dp"
android:color="#000" />
android:fromDegrees="45"
android:toDegrees="45"
android:pivotX="135%"
android:pivotY="15%">
android:height="10dp"
android:width="10dp"/>
這是imageView中的用法:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="net.eventilate.shapes.Balloon">
android:layout_width="106dp"
android:layout_height="30dp"
android:id="@+id/imageView2"
android:contentDescription="@string/test"
android:background="@drawable/balloon"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
總結
以上是生活随笔為你收集整理的android xml png,android - 使用.png文件中的形状创建xml聊天气泡 - 堆栈内存溢出的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android webview重绘,An
- 下一篇: 联想拯救者怎么u启动 如何U盘启动联想拯