首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何将气泡添加到textview android中?

如何将气泡添加到textview android中?
EN

Stack Overflow用户
提问于 2013-07-09 14:47:36
回答 1查看 28.2K关注 0票数 18

在我的应用程序中,我希望将气泡设置为文本视图,在文本视图中添加setBackgroundResource(),如您在代码中所见。

使用此代码,我得到的图像如下所示:

我想要一个像这样的泡泡形状的图像:

代码语言:javascript
复制
<?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中实现这一点。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17541739

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档