Android创建类似iphone的Gradient

标签 android gradient

我需要在我的 android 应用程序中创建类似黑色 iphone 的渐变。请查看下图中顶部的黑色渐变。怎么做?谢谢

alt text

最佳答案

也许是这样的?

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
  <gradient
      android:startColor="#FF000000"
      android:endColor="#FF8E8E8E"
      android:angle="270"/>
</shape>

关于Android创建类似iphone的Gradient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4510585/

相关文章:

opencv - 定向梯度直方图中的最终向量

swift - 如何在 ios-Charts 中将渐变应用于条形图中的条形图

android - 扫描梯度 : What it is and its examples

ios,无法获得 CGImageRef 的正确像素颜色

android - 如何在android中为textview获取像listview这样的选择外观

java - 将参数从 android 传递到 servlet/jsp

android - 操作系统强制关闭应用程序后是否清除了android应用程序缓存?

android - 使用我自己的 SQLite 数据库

java - 为什么 FileOutputStream 抛出 FileNotFoundException?

html - 渐变在 Microsoft Edge 中未正确显示