在我的应用程序中,我希望将气泡设置为文本视图,在文本视图中添加setBackgroundResource()
,如您在代码中所见。
使用此代码,我得到的图像如下所示:
我想要一个像这样的泡泡形状的图像:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#EDF5E4" />
<corners android:bottomLeftRadius="@dimen/corner_radius"
android:bottomRightRadius="@dimen/corner_radius"
android:topLeftRadius="@dimen/corner_radius"
id:topRightRadius="@dimen/corner_radius" />
请告诉我如何在我的setBackgroundResource()
XML中实现这一点。
https://stackoverflow.com/questions/17541739
复制相似问题