Usage of gradient in Android shape

Source: Internet
Author: User
<shape xmlns:android= "Http://schemas.android.com/apk/res/android" >


<gradient
android:angle= " the"
Android:endcolor= "@android: Color/black"
Android:centercolor= "@android: Color/holo_red_dark"
Android:startcolor= "@android: Color/white" >
</gradient>


</shape>


The key is the direction and starting position of the angle.



When the value of angle is 0 o'clock, White is on the left, red in the middle, black on the far right, as shown.




When the value of angle is 90, the white is at the bottom, the middle is red, the top is black, as shown



When the angle is 180, the white rightmost, the middle is red, the leftmost is black, as shown in



From the above case analysis, the direction of the angle gradient is starting from the left and the counter-clockwise gradient


Usage of gradient in Android shape

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.