2
CoordinatorLayout.Behavior
을 구현하고 onDependentViewChanged
함수를 재정의했으나 스크롤 뷰가 그대로 유지되는 경우에도 매 몇 밀리 초마다 작동한다는 걱정이 듭니다. 내가 여기에 대한 정보를 찾을 수없는 onDependentViewChanged
onDependentView CoordinatorLayout.Behavior에서 항상 호출 됨
에서 false를 반환하지만, 내 로그를 스팸이 일이 적절한 행동을 같이하지 않는 경우 변경되지 않습니다
. 배터리가 소모됩니다. 이 같은
내 단순화 된 레이아웃의 모양을 false를 반환에 명시된 바와 같이
<SwipeRefreshLayout
android:id="@+id/ptr"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</android.support.v4.widget.NestedScrollView>
<FrameLayout
android:id="@+id/avatarContainer"
android:layout_width="20dp"
android:layout_height="20dp"
app:layout_anchor="@id/scrollView"
app:layout_anchorGravity="center_horizontal|top"
app:layout_behavior="my.app.behaviors.ProfileAvatarBehavior">
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
</SwipeRefreshLayout>