태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.
2015.12.03 14:30



 [android] Shadow effect with custom shapes



출처 : https://slothdevelopers.wordpress.com/2014/05/22/shadow-effect-with-custom-shapes/


Android, Bottom, COLOR, Corner, custom button, custom shape, custom 버튼, Example, ITEM, layer-list, Left, Radius, Right, sample, selector, Shadow, shadow effect, Shape, Solid, state_pressed, Top, xml, [android] Shadow effect with custom shapes, 안드로이드


Custom 한 버튼을 만드는 xml 정의이다.


Custom 한 Shadow 와 Custom 한 버튼 모양을 만들기에 좋다.



Android, Bottom, COLOR, Corner, custom button, custom shape, custom 버튼, Example, ITEM, layer-list, Left, Radius, Right, sample, selector, Shadow, shadow effect, Shape, Solid, state_pressed, Top, xml, [android] Shadow effect with custom shapes, 안드로이드

<요런 요런>



<?xml version="1.0" encoding="utf-8"?>

 

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true">

        <layer-list>

            <item android:left="4dp" android:top="4dp">

                <shape>

                    <solid android:color="#ff58bb52" />

                    <corners android:radius="30dip"/>

                </shape>

            </item>

        </layer-list>

    </item>

    <item>

        <layer-list>

            <!-- SHADOW LAYER -->

            <item android:left="4dp" android:top="4dp">

                <shape>

                    <solid android:color="#66000000" />

                    <corners android:radius="30dip"/>

                </shape>

            </item>

            <!-- CONTENT LAYER -->

            <item android:bottom="4dp" android:right="4dp">

                <shape>

                    <solid android:color="#ff58bb52" />

                    <corners android:radius="30dip"/>

                </shape>

            </item>

        </layer-list>

    </item>

</selector>


더보기





댓글을 달아 주세요


Posted by 돼지왕왕돼지