새로 고침을 구현하려고하지만 하위보기의 높이를 래핑하지 않는 SwipeRefreshLayout
과 관련된 문제가 있습니다. 뷰 미리보기 및 라이브 빌드에서 높이가 0 인 것처럼 보입니다.AppBarLayout의 SwipeRefreshLayout이 내용을 래핑하지 않습니다.
다음과 같은 레이아웃 : 나는 또한 어떤 성공없이 SwipeRefreshLayout
AppBarLayout
의 부모를 만들기뿐만 아니라 SwipeRefreshLayout
의 내부에 단수 LinearLayout
퍼팅 시도
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_collapseMode="pin">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/child_layout" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
. 스 와이프 레이아웃의 높이가 0이되지 않도록하는 유일한 방법은 고정적으로 설정하는 것이지만 하위보기의 높이를 기준으로 동적으로 지정하고 싶습니다.
여기에 누락 된 것이 있습니까? SwipeRefreshLayout
의 버그가있는 것 같습니다. LinearLayout
으로 바꾸면 콘텐츠가 예상대로 작동하기 때문입니다.
클릭 수 상위에 있어야한다 청결을 유지? 큰 소리로 생각하면 .. – Phix
'child_layout'에 대한 코드를 게시 할 수 있습니까? – Kiya
툴바 내부에서 작업하는 이유는 무엇입니까? 분리하지 않는 이유 – Saveen