如何在TextView Android中为文本添加边框 [英] how to add border to a text in textview android

查看:1009
本文介绍了如何在TextView Android中为文本添加边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android中,如何在文本周围添加边框?我想要在TextView中的文本周围边框而不是在TextView中周围.是否有任何方法可以做到这一点?如果是这样,请指出需要执行的正确步骤.

In Android, how can you add a border around a text? I want a border around the text in TextView not around the TextView.Is there any way to do it in? If so, please point me to the proper steps needed to do..

推荐答案

尝试一下..

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello_world"
    android:textColor="#f8f36a"
    android:textSize="65sp"
    android:shadowColor="#ff0000" 
    android:shadowRadius="2"/>

结果是

您可以为这样的文本创建自定义边框..这里是示例应用程序.

You can create custom border for text like this..Here is a sample application.

这篇关于如何在TextView Android中为文本添加边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆