Commonly used, record it.
Rendering:
First create a new xml file bg_gradient.xml
Quote in the layout file
android:background="@drawable/bg_gradient"
More android For related articles on the method of realizing color gradient of background images, please pay attention to the PHP Chinese website!