사용자 지정 동작과 함께 사용할 때 스 와이프하여 레이아웃 문제를 새로 고칩니다.

KCD

나는이 CoordinatorLayout정의와보기를 포함하는 CoordinatorLayout.Behavior(item_search_button을)과 SwipeRefreshLayout을 함유 NestedScrollView. 사용자 정의보기는 일반 스크롤을 사용하여 화면 밖으로 스크롤해야하지만 사용자가 목록을 위로 스크롤하자마자 나타나야하는 (위에서 스크롤) 버튼입니다. 이것은 예상대로 작동합니다. 내 문제는의 새로 고침 표시기가 SwipeRefreshLayout사용자 정의보기 item_search_button 뒤에 표시된다는 것입니다.

 <android.support.design.widget.CoordinatorLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar_startpage"
        app:snackbar="@{offlineSnackbarVM.snackbarData}">

        <include
            layout="@layout/item_search_button"
            app:vm="@{searchButtonVM}"/>

        <android.support.v4.widget.SwipeRefreshLayout
            android:id="@+id/swipeRefreshLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            app:refreshing="@{reloadVM.refreshInProgress}">

            <android.support.v4.widget.NestedScrollView
                android:id="@+id/nestedView"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout
                    android:id="@+id/elementsContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingTop="@dimen/spacing_48"/>

            </android.support.v4.widget.NestedScrollView>

        </android.support.v4.widget.SwipeRefreshLayout>

    </android.support.design.widget.CoordinatorLayout>

item_search_button.xml :

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data class="SearchButtonBinding">

    <variable
        name="viewmodel"
        type="vm.SearchButtonVM"/>

</data>
 <android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:layout_behavior="behaviors.ScrollSnapBehavior"
    android:layout_margin="@dimen/spacing_8"
    android:onClick="@{() -> vm.openSearch()}">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:ellipsize="end"
            android:maxLines="1"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/leftIcon"
            app:layout_constraintRight_toLeftOf="@+id/rightIcon"
            app:layout_constraintTop_toTopOf="parent"/>

    </android.support.constraint.ConstraintLayout>

</android.support.v7.widget.CardView>
</layout>

여기에 이미지 설명 입력

하지만 항목 전에 그것을 원합니다. 어떻게 해결할 수 있습니까?

KCD

마지막으로 해결 방법으로 문제를 해결했습니다.

  1. onScrollListener를 사용하여 목록이 맨 위에 있는지 확인하고 맨 위에 translationX있는지 여부를 설정 하여 인디케이터가 카드 뷰 위에 표시되도록합니다.
  2. 사용 setProgressViewOffset()오프셋을 증가시키고 불쾌한 플리커 효과를 방지하기 위해 cardview 아래에 페인트.

나를 위해 작동합니다 ...

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Kivy- 버튼 레이아웃과 함께 ScreeManager를 사용할 때 문제가 더 이상 작동하지 않습니다.

생성자와 함께 액세스 수정자를 사용하지 않고 사용할 때 다른 결과

jQuery Mobile과 부트 스트랩을 함께 사용할 때 바닥 글이 제대로 작동하지 않음

Composer와 함께 psr-4 자동로드를 사용할 때 네임 스페이스를 지정하는 이유는 무엇입니까?

Composer와 함께 psr-4 자동로드를 사용할 때 네임 스페이스를 지정하는 이유는 무엇입니까?

유형과 문자열을 함께 사용할 때 숫자와 함께 작동하지 않는 JS 스위치 케이스

aws-iot (wss)와 함께 사용자 지정 권한 부여자를 사용하면 디바이스가 데이터를 연결하고 전송할 때마다 새 디바이스가 생성됩니까?

TextView를 표시 할 때 Dialog Fragment (사용자 지정 레이아웃)가 작동하지 않습니다.

자동 레이아웃과 함께 사용자 정의 UIView 클래스를 사용하면 잘못된 경계가 반환됩니다.

백그라운드 프로세스와 함께 명명 된 파이프를 사용할 때 다양한 동작

NetBeans 출력이 제대로 작동하지 않기 때문에 NetBeans와 함께 상속을 사용하여 프로그램을 실행합니다.

CSS와 함께 플렉스 레이아웃을 사용할 때 스크롤바 문제를 해결하는 방법은 무엇입니까?

오류: 스레드 1: "제약 조건에 대해 준비되지 않은 보기 계층 구조로 레이아웃을 설정할 수 없습니다." 자동 레이아웃을 사용할 때

-d 인수와 함께 'watch'를 사용하여 변경 사항이 그래픽 효과를 사라지고 새로 고침 할 때마다 잠수함 사운드를 재생하도록하는 방법이 있습니까?

플로팅 작업 버튼, 스 와이프 새로 고침 레이아웃 및 코디네이터 레이아웃 및 도구 모음 레이아웃 동작을 함께 사용

플레이북과 함께 사용할 때 Ansible 설정 모듈의 필터가 작동하지 않습니다

Angular2와 함께 사용자 정의 구성 요소를 사용할 때 JQueryUI Sortable이 작동하지 않습니다.

kivy 버튼 동작은 `kv lang`과 함께 사용할 때 이미지를 전환하지 않습니다.

"return" 문과 함께 함수를 사용할 때 코드가 숭고한 텍스트에서 작동하지 않습니다.

"return" 문과 함께 함수를 사용할 때 코드가 숭고한 텍스트에서 작동하지 않습니다.

인텐트를 사용하여 새 활동을 시작할 때 레이아웃이 표시되지 않음

자동 레이아웃이 이미지보기와 레이블이 함께 정렬 될 때 제대로 작동하지 않음

사용자 지정 문자 이스케이프 처리기와 함께 jaxb를 사용하여 개체를 xml로 변환하는 동안 오류가 발생했습니다.

타이프 스크립트와 함께 몽구스를 사용하여 사용자 정의 유효성 검사를 생성 할 때 오류 발생

Next.js를 사용자 지정 호스트 이름과 함께 사용할 수 없습니다.

DNN과 함께 Google 태그 관리자를 사용할 때 구조 데이터 테스트 도구로 스키마 코드를 감지 할 수 없습니다.

사용자 정의 UITabBarItem과 함께 사용할 이미지를 준비 할 때 사용해야하는 특정 설정이 있습니까?

사용자 정의 UITabBarItem과 함께 사용할 이미지를 준비 할 때 사용해야하는 특정 설정이 있습니까?

UIScrollView와 함께 스냅 킷 / 자동 레이아웃 사용

TOP 리스트

  1. 1

    Ionic 2 로더가 적시에 표시되지 않음

  2. 2

    JSoup javax.net.ssl.SSLHandshakeException : <url>과 일치하는 주체 대체 DNS 이름이 없습니다.

  3. 3

    std :: regex의 일관성없는 동작

  4. 4

    Xcode10 유효성 검사 : 이미지에 투명성이 없지만 여전히 수락되지 않습니까?

  5. 5

    java.lang.UnsatisfiedLinkError : 지정된 모듈을 찾을 수 없습니다

  6. 6

    rclone으로 원격 디렉토리의 모든 파일을 삭제하는 방법은 무엇입니까?

  7. 7

    상황에 맞는 메뉴 색상

  8. 8

    SMTPException : 전송 연결에서 데이터를 읽을 수 없음 : net_io_connectionclosed

  9. 9

    정점 셰이더에서 카메라에서 개체까지의 XY 거리

  10. 10

    Windows cmd를 통해 Anaconda 환경에서 Python 스크립트 실행

  11. 11

    다음 컨트롤이 추가되었지만 사용할 수 없습니다.

  12. 12

    C #에서 'System.DBNull'형식의 개체를 'System.String'형식으로 캐스팅 할 수 없습니다.

  13. 13

    JNDI를 사용하여 Spring Boot에서 다중 데이터 소스 구성

  14. 14

    Cassandra에서 버전이 지정된 계층의 효율적인 모델링

  15. 15

    복사 / 붙여 넣기 비활성화

  16. 16

    Android Kotlin은 다른 활동에서 함수를 호출합니다.

  17. 17

    Google Play Console에서 '예기치 않은 오류가 발생했습니다. 나중에 다시 시도해주세요. (7100000)'오류를 수정하는 방법은 무엇입니까?

  18. 18

    SQL Server-현명한 데이터 문제 받기

  19. 19

    Seaborn에서 축 제목 숨기기

  20. 20

    ArrayBufferLike의 typescript 정의의 깊은 의미

  21. 21

    Kubernetes Horizontal Pod Autoscaler (HPA) 테스트

뜨겁다태그

보관