Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用以下方法创建阴影:
textView.getPaint().setMaskFilter(new BlurMaskFilter(5, Blur.OUTER));
我发现它比 提供更好的结果android:shadow...,但是对于纯黑色,“阴影”仍然太模糊。
android:shadow...
有没有办法让它在半径相对较大的情况下变得更锋利?
请注意,文档中提到我不应该修改它TextPaint,但是我需要一个带有透明文本的外阴影。如果可以在不直接修改 的情况下实现这一点TextPaint,我们将不胜感激。
TextPaint
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); super.onDraw(canvas); }