我想创建一个从内到外的背景渐变。在外面,它应该变得更暗。这是一张图片:
任何人都可以给我一些建议,我该如何创建这样的东西? 或者我应该为此拍照吗?如果是,那么不同的屏幕分辨率是什么?或者关于横向/纵向方式?
最佳答案
根据需要使用此更改颜色
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:type="radial"
android:startColor="#f15330"
android:endColor="#da0000"
android:gradientRadius="150dp"
/>
<size android:height="400dp"
android:width="250dp"/>
</shape>
关于安卓矩形背景渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43775755/