简体   繁体   English

Android中LinearLayout的浮雕效果

[英]Emboss effect for a LinearLayout in android

I have a textview and imageview inside horizontal linearlayout which has blue color as its background. 我在水平linearlayout里面有一个textview和imageview,它的背景是蓝色。 How can i add Emboss effect for the lineatlayout? 如何为lineatlayout添加浮雕效果? Please help me 请帮我

Android does provide some feature for creating an Emboss Effect by using EmbossMaskFilter.. Android确实提供了一些通过使用EmbossMaskFilter创建浮雕效果的功能。

For more details, you can visit this link: http://android-coding.blogspot.in/2012/05/example-of-embossmaskfilter.html 有关更多详细信息,您可以访问以下链接: http : //android-coding.blogspot.in/2012/05/example-of-embossmaskfilter.html

Also if you need to apply this effect for 2D-graphics, then you can use this link: http://about-android.blogspot.in/2010/07/2d-graphics-with-effects_11.html 另外,如果您需要将此效果应用于2D图形,则可以使用此链接: http : //about-android.blogspot.in/2010/07/2d-graphics-with-effects_11.html

I would suggest making a 9 patch with the emboss built into the image. 我建议使用图像中内置的浮雕制作9个补丁。

That way you can make the size and colour whatever you want. 这样,您可以根据需要调整大小和颜色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM