Android textview大纲文本 [英] Android textview outline text

查看:180
本文介绍了Android textview大纲文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个简单的方法让文本能够有一个黑色的轮廓?我有文本视图将是不同的颜色,但一些颜色不会显示在我的背景这么好,所以我想知道是否有一个简单的方法来获得一个黑色轮廓或其他任何工作?我不想创建自定义视图并创建一个画布等。

Is there a simple way to have text be able to have a black outline? I have textviews that will be different colors, but some of the colors don't show up on my background so well, so I was wondering if there's an easy way to get a black outline or something else that will do the job? I'd prefer not to have to create a custom view and make a canvas and such.

推荐答案

文本,这通常可以帮助可读性。尝试在绿色文本上尝试50%半透明的黑色阴影。有关如何执行此操作的详细信息,请点击此处: Android - 文字上的阴影?

You can put a shadow behind the text, which can often help readability. Try experimenting with 50% translucent black shadows on your green text. Details on how to do this are over here: Android - shadow on text?

要真正在文本上添加一个笔画,你需要做一些更多的事情,像这样:
如何在Android上在MapView上使用边框绘制文本?

To really add a stroke around the text, you need to do something a bit more involved, like this: How do you draw text with a border on a MapView in Android?

这篇关于Android textview大纲文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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