How do you draw text with a border on a MapView in Android?

后端 未结 4 1990
北海茫月
北海茫月 2020-11-28 02:49

I\'m trying to draw some text onto an MapView on Android. The drawing of the text goes fine, but it\'s very hard to read the text because it\'s white with no black border (

4条回答
  •  感情败类
    2020-11-28 03:12

    The half-answer, which may or may not be good enough (it was in my case), is to set a shadow:

    textPaint.setShadowLayer(3, 0, 0, Color.BLACK);
    

    The shadow helps the text stand out a lot, but isn't quite as good as a black border would be. I'm still curious how to solve the original question.

提交回复
热议问题