如何使一个渐变背景的LinearLayout中? [英] How to make a gradient background for a LinearLayout?

查看:249
本文介绍了如何使一个渐变背景的LinearLayout中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想,什么是做在Java中(不是XML)?

I was wondering, what would be the best way to make a gradient background for a LinearLayout in java ( not xml ) ?

任何想法?

谢谢!

推荐答案

除了XML还可以使用的 GradientDrawable 该有相应的方法对所有XML属性

Besides xml you can also use GradientDrawable it has corresponding methods for all xml attributes

这篇关于如何使一个渐变背景的LinearLayout中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆