0

I have this:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:height="4dp" android:gravity="bottom"> // this height not available under api 23
    <shape android:shape="rectangle" >
        <size
            android:height="4dp"/>
        <corners android:bottomLeftRadius="0dp"
            android:topLeftRadius="0dp"
            android:bottomRightRadius="360dp"
            android:topRightRadius="360dp">
        </corners>
        <gradient
            android:startColor="another_color" // Fake colors
            android:endColor="one_color"/>
    </shape>
</item>
</layer-list>

I've added size to the shape from other post recommendation but not working. I need my gradient to make 4dp of height only

Adriaan
  • 17,741
  • 7
  • 42
  • 75
  • You can set a height of a view and apply this gradient (without height) to the view. – CoolMind Jan 23 '23 at 10:11
  • Please do not add answers to the question body itself. Instead, you should add it as an answer. [Answering your own question is allowed and even encouraged](https://stackoverflow.com/help/self-answer). – Adriaan Jan 25 '23 at 11:16
  • @CoolMind can you post it as an answer? – Albert Buigues Jan 25 '23 at 11:22
  • @AlbertBuigues, yes, maybe. But you can also answer your own question. A reply form is below. In this case you can achieve more reputation. – CoolMind Jan 25 '23 at 18:26
  • For example, here I answered to my question: https://stackoverflow.com/questions/56473539/retrofit-2-6-0-exception-java-lang-illegalargumentexception-unable-to-create-c. – CoolMind Jan 25 '23 at 18:27

0 Answers0