2014-02-21 2 views

답변

1

This가 큰 도움입니다 사전에

감사를 도와주세요.

코드 조각 :

이 state_empty를 들어,

에서이 항목을 추가 단순히 ... 아무것도 표시하지 않을 투명 색상을 사용, 혼동하지 입니다 다른 이미지를 설정하거나 수 다른 사람과 함께 당신의 상태 당김 ....

<item android:state_empty="true" android:drawable="@android:color/transparent"/> 

그래서, 당신의 표시는 다음과 같이 할 수있다 :

<selector xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item android:state_empty="true" android:drawable="@android:color/transparent"/> 
    <item android:state_expanded="true" android:drawable="@drawable/my_icon_max" /> 
    <item android:drawable="@drawable/my_icon_min" /> 
</selector> 

설명 :

getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.indicator)); 
+1

다행 도움이 :

android:state_empty: - the element does not have any child android:state_expanded: - state when it is expanded android:drawable: - normal state, that is the cell has children but its not expanded 

이 같은 지표를 설정합니다. ! –

관련 문제