Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_issues.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:text="显示dialog"
android:onClick="onTestClick" />

<android.support.v7.widget.RecyclerView
<com.dnwalter.formlayoutmanager.view.HVSingleRecylerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="250dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,58 @@ public boolean fling(int velocityX, int velocityY) {
}
return super.fling(velocityX, velocityY);
}

@Override
public int computeHorizontalScrollOffset() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeHorizontalScrollOffset(new RecyclerView.State());
}
}

@Override
public int computeHorizontalScrollExtent() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeHorizontalScrollExtent(new RecyclerView.State());
}
}

@Override
public int computeHorizontalScrollRange() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeHorizontalScrollRange(new RecyclerView.State());
}
}

@Override
public int computeVerticalScrollOffset() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeVerticalScrollOffset(new RecyclerView.State());
}
}

@Override
public int computeVerticalScrollExtent() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeVerticalScrollExtent(new RecyclerView.State());
}
}

@Override
public int computeVerticalScrollRange() {
if (getLayoutManager() == null) {
return 0;
} else {
return getLayoutManager().computeVerticalScrollRange(new RecyclerView.State());
}
}
}