각 행에 CheckedTextView가 포함 된 ListView가 있습니다.CheckedTextView 내에서 사용자 정의 checkMark 위치 조정
이<CheckedTextView
android:id="@+id/body"
android:gravity="left"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_below="@+id/date"
android:textSize="18sp"
android:checkMark="@drawable/checkbox_selector"
/>
드로어 블 checkbox_selector가 제대로 예상대로 '에'와 '오프'선택 처리하고 다음과 같습니다 :
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_selected="true" android:state_pressed="true"
android:drawable="@drawable/checkbox_on" >
</item>
<item android:state_pressed="true" android:drawable="@drawable/checkbox_on" />
<item android:state_checked="true" android:drawable="@drawable/checkbox_on"/>
<item android:drawable="@drawable/checkbox_off" />
</selector>
여기가 내가이 그릴 수 사용하는 사용자 지정 체크 표시 속성을 사용하고 있습니다 현재의 ListView 레이아웃의 스크린 샷 : 당신이 볼 수 있듯이
, 체크 박스는 상단 정렬됩니다. 오른쪽 센터에 어떤 방법이 있습니까? 선택기 리소스의 특성을 확인하는 중이를 수행 할 관련 특성을 찾을 수 없습니다.
위치를 조정할 수있는 방법이 있습니까? 시간 내 주셔서 감사합니다.
http://developer.android.com/reference/android/widget/LinearLayout.html이 Dhwanik을 주셔서 감사합니다. center_vertical은 내가 필요한 것입니다. – Heelara
환영합니다 :)이 대답을 찾으면 도움이됩니다. –