2014-11-28 2 views
0

내 사용자 정의 격자보기의 각 셀에 그림자를 적용하고 싶습니다. 나는 그런 내 그리드보기의 각 셀에 그림자를 원하는,사용자 정의 격자보기에 그림자 적용

Desired Output

각 셀 아래에 그림자를 참조 -이 :

나는 출력이 같은 싶어요.

내 코드 : -

<?xml version="1.0" encoding="utf-8"?> 
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > 
    <item > 

     <shape 
      android:shape="rectangle"> 

      <corners 
       android:radius="5dp"/> 
      <gradient 
      android:startColor="#202020" 
      android:endColor="#454545" 
      android:angle="270"/> 

     </shape> 
     </item> 

    <item 
     android:bottom="5dp"> 
     <shape 
      android:shape="rectangle"> 

     <solid 
      android:color="#202020"/> 
     <corners 
      android:radius="3dp"/> 
     <stroke 
     android:width="1dp" 
     android:color="#ffffff" > 
     </stroke> 
     </shape> 
    </item> 


</layer-list> 

사람이 코드의 개선을 지적 할 수 있습니다. 감사.

+0

무엇이 문제입니까? 너 지금 뭐하고 있니? –

+0

그림자가 전혀 없습니다. – Mohit

+0

xml 드로어 블 대신 ** 패치 9 ** 사용을 고려하십시오. –

답변

관련 문제