Android的TextView的大纲文本大纲、文本、Android、TextView

2023-09-12 00:46:36 作者:谁跟你一样哦.

有没有一种简单的方法,有文字能够有一个黑色的轮廓?我有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%的半透明的黑色阴影的绿色文本实验。如何做到这一点细节在这里: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

要真正增加中风周围的文字,你需要做一些更复杂一点,像这样: 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