material design - Applying gradient on an android button with ripple -


to apply gradient on button create gradient.xml this

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient     android:angle="270"     android:endcolor="#fff"     android:startcolor="#f00" /> 

when set button background material effects of button gone.

i heard can use backgroundtint property of button cannot equate drawable , color resource allowed.

how can apply gradient background on button while keeping material , feel?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -