を使用して、影のようなショーの勾配は直線的で、ボタンをラップしていますレイアウトと私はレイアウトの上にグラデーションを与えたいと思います。アンドロイド:こんにちは、私は画像からshape.xml</p> <p><a href="https://i.stack.imgur.com/byuKw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/byuKw.png" alt="enter image description here"></a></p> <p>を使用して唯一の上にグラデーションのような影を取得しようとしていますshape.xml
アムは、以下のようにやっていますが、レイヤリストを使用する
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape
android:shape="rectangle">
<stroke android:width="1dp" android:color="#f0f0f0" />
<solid android:color="#f0f0f0" />
</shape>
</item>
<item android:top="1dp">
<shape
android:shape="line">
<gradient
android:angle="90"
android:type="linear"
android:startColor="#FFFFFF"
android:endColor="#000000" />
</shape>
</item>
</layer-list>
コードが全体の直線layout..justに勾配を与えていることをhari86 @レイアウト – hari86
に行をしたい、理解していませんでしたあなたのポイント。 –