【发布时间】:2019-07-18 02:36:21
【问题描述】:
例如我有这个来自 CSS 的块:
.Rectangle {
width: 1000px;
height: 500px;
background-image: linear-gradient(60deg, #101010 30%, #151515 20%, #000000);
}
我怎样才能在android上制作它? 还有一件事。 GradientDrawable 中的角度值始终为 45*x。我怎样才能把它放在“60”?
<gradient android:angle="45"
android:startColor="#101010"
android:centerColor="#151515"
android:endColor="#000000"
android:centerX="0.35"
android:centerY="1"/>
【问题讨论】:
-
在 android 中,用于角度属性
It must be a multiple of 45。 developer.android.com/guide/topics/resources/…,所以我觉得你不能用60
标签: android android-drawable linear-gradients