Skip to content

Apply padding in Parent Layout #24

@desmond1121

Description

@desmond1121

I've noticed that you handle bottom padding in scroll back. That would cause much time in "measure".
I catched a systrace of your "scroll back":

trace

I understand why you need this logic, View.offsetTopAndBottom would destroy the bottom padding. But this not handled in scroll down yet. Actually, you can notify user to set padding in parent layout such as following code, and handle padding logic in onLayout() of PullToRefreshView.

<com.yalantis.phoenix.PullToRefreshView
        android:id="@+id/pull_to_refresh"
        android:padding="10dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <ListView
        android:id="@+id/yalantis_list_view"
        android:divider="@null"
        android:dividerHeight="0dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</com.yalantis.phoenix.PullToRefreshView>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions