小智 6
创建一个形状,将其添加到可绘制对象中,例如: <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/gradient_start" <!--this first color -->
android:endColor="@color/gradient_end" <!--this second color -->
android:angle="-270" /> <!--gradient angle -->
</shape>
然后在您的splash.xml背景上,将background设置为shape
加
<LinearLayout
android:id="@+id/ranking_order"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/list_grad"
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3249 次 |
| 最近记录: |