Android에서 튜브와 같은 맞춤 탐색 서랍을 만드십시오.
-
20-12-2019 - |
문제
안녕하세요 친구가 내 응용 프로그램에서 튜브처럼 맞춤형 슬라이딩 서랍을 만들기 위해 Wnat
사용자가 항목을 클릭하면 위의 이미지를 보여 주어야합니다. 그래서 어떤 아이디어를 달성 할 수 있는지를 강조해야합니다.
해결책
어제 나는 같은 문제에 직면했다
but this examples highlight selector in whole listbackground but i also want red color indicator at starting which is mention
두 개의 선택기를 만들어야합니다.1. 전체 항목 2. 그 빨간색 부분
왼쪽에 ListItem에서보기를하고 셀렉터를 만듭니다.
다음 코드를 사용하십시오.여기 android:duplicateParentState="true"
가 당신을 위해 작동합니다.
이 속성이 true로 설정되면 뷰가 도래 할 수있는 상태를 가져옵니다.
(초점을 맞추거나, 눌러졌습니다.) 직접 부모로부터
그 자체.
<TextView
android:layout_width="3dp"
android:layout_height="match_parent"
android:duplicateParentState="true"
android:background="@drawable/selector_for_red" />
. 제휴하지 않습니다 StackOverflow