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

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

问题描述

有没有一种简单的方法,有文字能够有一个黑色的轮廓?我有textviews,将不同的颜色,但是有的颜色不上我的背景显示出来这么好,所以我在想,如果有一个简单的方法来得到一个黑色的轮廓,或其他什么东西,会做这项工作?我想preFER不是要创建一个自定义视图,使一个帆布和这样的。

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%的半透明的黑色阴影的绿色文本实验。如何做到这一点细节在这里:<一href="http://stackoverflow.com/questions/2486936/android-shadow-on-text">http://stackoverflow.com/questions/2486936/android-shadow-on-text

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: http://stackoverflow.com/questions/2486936/android-shadow-on-text

要真正增加中风周围的文字,你需要做一些更复杂一点,像这样: <一href="http://stackoverflow.com/questions/1723846/how-do-you-draw-text-with-a-border-on-a-mapview-in-android">http://stackoverflow.com/questions/1723846/how-do-you-draw-text-with-a-border-on-a-mapview-in-android

To really add a stroke around the text, you need to do something a bit more involved, like this: http://stackoverflow.com/questions/1723846/how-do-you-draw-text-with-a-border-on-a-mapview-in-android

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

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