Android: how to create shape with skewed two-tone color?
问题 I am attempting to create a drawable shape that will become the background of a search bar. I know how to create a rectangle with two colors but I do not know how to tilt the color at an angle, like in the second image. Can someone help me with this? Thanks. 回答1: Take a Toolbar...code is here... <android.support.v7.widget.Toolbar android:layout_width="500dp" android:layout_height="wrap_content" android:background="@drawable/custom_background" /> create a drawable res file custom_background