Created
February 22, 2014 09:06
-
-
Save zaki50/9150791 to your computer and use it in GitHub Desktop.
パネルの背景画像用の drawable リソースとして、上端にハイライト、下端にシャドウをいれたものを作る例。色を変えやすいように基本部分は shape を使う。ハイライトとシャドウはshapeでは作れないので、半透明な9patch画像を用意する。xxhdpi用だとこんな感じ https://dl.dropboxusercontent.com/u/713512/highlight_and_shadow.9.png
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape | |
android:shape="rectangle"> | |
<solid android:color="#ffcccccc"/> | |
</shape> | |
</item> | |
<item android:drawable="@drawable/highlight_and_shadow"/> | |
</layer-list> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment