先看下我绘制出来的效果图吧:
为什么我绘制的背景不光滑,好像一层一层的像波浪一样。
我背景引用的是login_background.xml,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="rectangle">
<gradient
android:startColor="#67AADC"
android:endColor="#043C91"
android:type="radial"
android:centerX="50%"
android:centerY="30%"
android:gradientRadius="1000" />
</shape>登录按钮的背景是引用drawable/button_shape_1.xml,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true">
<corners android:radius="5dp"/>
<stroke android:width="1dp" android:color="#CBCBCB" />
<gradient
android:startColor="#C6CCD1"
android:endColor="#F9FBFB"
android:type="linear"
android:angle="90" />
</shape>最近刚学Android,请各位多多指教。。我是按照QQ登录界面的效果来练练手的,但是总是效果差得太远了。
android渐变绘制背景qq登录drawable
为什么我绘制的背景不光滑,好像一层一层的像波浪一样。
我背景引用的是login_background.xml,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="rectangle">
<gradient
android:startColor="#67AADC"
android:endColor="#043C91"
android:type="radial"
android:centerX="50%"
android:centerY="30%"
android:gradientRadius="1000" />
</shape>登录按钮的背景是引用drawable/button_shape_1.xml,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true">
<corners android:radius="5dp"/>
<stroke android:width="1dp" android:color="#CBCBCB" />
<gradient
android:startColor="#C6CCD1"
android:endColor="#F9FBFB"
android:type="linear"
android:angle="90" />
</shape>最近刚学Android,请各位多多指教。。我是按照QQ登录界面的效果来练练手的,但是总是效果差得太远了。
android渐变绘制背景qq登录drawable
哎,穷人家的孩子,还在用古老的Symbian机