Android按钮或文本视图上的阴影。

huangapple go评论59阅读模式
英文:

Shadow on android button or textview

问题

我怎样在Android Studio上给按钮或TextView添加阴影,以使我的按钮和文字看起来酷炫?

注意:我是Android开发的初学者,所以不想做我不理解的事情。

英文:

How can i add shadow on a button or textview on android studio to make cool my buttons and text's ??

NOTE: I'm beginner on android development so i don't want to make something that I do not understand

答案1

得分: 1

使用这个示例:

<TextView android:id="@+id/txt1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textSize="14sp"
          android:textStyle="bold"
          android:textColor="#ff00ff"
          android:shadowColor="eeeeee"
          android:shadowDx="1"
          android:shadowDy="1"
          android:shadowRadius="2" />
英文:

use this sample:

&lt;TextView android:id=&quot;@+id/txt1&quot;
                  android:layout_width=&quot;wrap_content&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:textSize=&quot;14sp&quot;
                  android:textStyle=&quot;bold&quot;
                  android:textColor=&quot;#ff00ff&quot;
                  android:shadowColor=&quot;eeeeee&quot;
                  android:shadowDx=&quot;1&quot;
                  android:shadowDy=&quot;1&quot;
                  android:shadowRadius=&quot;2&quot; /&gt;

huangapple
  • 本文由 发表于 2020年10月2日 16:43:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/64168598.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定