【问题标题】:Glowing text contour in android.android中的发光文本轮廓。
【发布时间】:2012-04-09 17:41:39
【问题描述】:

如何在android中添加发光的文本轮廓?

这是一个例子:

【问题讨论】:

  • 其实我也不知道。但它看起来像..但这是一个很好的例子。但是我想用不同的字体来做。
  • @Xazen : 看看这可能有帮助 :How to make text glow
  • 谢谢。但不幸的是我需要用轮廓来做。
  • @Xazen:然后使用 LinearGradient 来查看我的答案:add shadow on custom text?

标签: android text contour glow


【解决方案1】:

使用 x 、 y = 0 和 Radious 值为您的文本视图添加阴影,只要您喜欢发光即可。

<TextView android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Glowing" 
android:textSize="40sp" 
android:textStyle="bold" 
android:shadowColor="#0000ff" 
android:textColor="#C02938" 
android:shadowDx="0.0" 
android:shadowDy="0.0" 
android:shadowRadius="10"/>

【讨论】:

  • 只能在文本被触摸的情况下这样做吗?像一个按钮?
  • 你也可以在按钮标签中使用它,而不仅仅是在文本视图中
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-05-08
  • 1970-01-01
  • 1970-01-01
  • 2011-06-22
  • 2012-05-28
  • 1970-01-01
  • 2020-10-25
相关资源
最近更新 更多