【问题标题】:Is it possible to add effects to text in a TextView?是否可以在 TextView 中为文本添加效果?
【发布时间】:2011-08-25 09:59:21
【问题描述】:

在我的初始屏幕中,我有一个 TextView,它显示了应用程序的名称。是否可以在此文本中添加效果(例如阴影)?

【问题讨论】:

  • 恐怕图片在不同的屏幕尺寸下会拉伸或压缩。

标签: android text textview effect


【解决方案1】:

你可以用这样的东西来放置阴影,它可以工作

<TextView
    android:id="@+id/text"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:shadowColor="#555555"
    android:shadowDx="5.0"
    android:shadowDy="5.0"
    android:shadowRadius="3.0"
    />

【讨论】:

    【解决方案2】:

    是的,当然,您可以使用微光效果使您的初始屏幕更具创新性。

    如果您实现,则启动屏幕上的应用程序名称将具有从左到右的发光效果。 你可以看到我对这个效果的回答。 https://stackoverflow.com/a/34327956/2022000

    【讨论】:

      猜你喜欢
      • 2020-09-26
      • 1970-01-01
      • 2018-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-23
      • 2012-07-03
      相关资源
      最近更新 更多