0
4 개의 직사각형이있는 사용자 정의보기가 있습니다. 이보기를 xml에서 구성 가능하게 만들고 싶습니다.사용자 정의보기. attrs 배열
custom:rectColor="red|cyan|blue|green" //each color correspond rectangle
<attr name="rectColor" format="color">
<flag name="red" value="2" />
<flag name="cyan" value="5" />
<flag name="blue" value="7" />
<flag name="green" value="9" />
</attr>
로 아니면이어야합니다 :
은 가능한 그것을 좋아하는 것입니다
<attr name="firstRectColor" format="color" />
<attr name="secondRectColor" format="color" />
<attr name="thirdRectColor" format="color" />
<attr name="fourthRectColor" format="color" />
및 각보기는해야 포함
custom:firstRectColor="red"
custom:secondRectColor="red"
custom:thirdRectColor="red"
custom:fourthRectColor="red"
그리고 가능한 경우. 속성에서 색상 값 세트를 가져 오는 방법은 무엇입니까?
감사