Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AppBarLayout / CoordinatorLayout #20

Open
AkshayChordiya opened this issue Jan 12, 2016 · 11 comments
Open

Support for AppBarLayout / CoordinatorLayout #20

AkshayChordiya opened this issue Jan 12, 2016 · 11 comments

Comments

@AkshayChordiya
Copy link

Hey @krimin-killr21

The AppBarLayout is used to perform scrolling techniques one of which is Showing and Hiding Toolbar on scroll which affects the ScrollBar.
I'll try to provide screenshot of this issue for better understanding. You can look this issue to understand the problem pluscubed/recycler-fast-scroll#4

@K0bin
Copy link

K0bin commented Mar 10, 2016

A solution would be to implement the whole scrollbar logic in a CoordinatorLayout behavior. This would also remove the hierarchy requirements (no more issues with RelativeLayouts and giving ids).

@AkshayChordiya
Copy link
Author

@krimin-killr21 Any workaround for this?

@AkshayChordiya
Copy link
Author

@Rhedox Seems great idea. Can you post code or way to do it?

@K0bin
Copy link

K0bin commented Mar 22, 2016

I think that would require a rewrite of the complete library. If youre interested heres information on how to implement the behavior. https://lab.getbase.com/nested-scrolling-with-coordinatorlayout-on-android/

@turing-tech
Copy link
Owner

I'll look into it this weekend. I'm in the process of managing my entrance into university this fall so I've been pressed with time, but I'll do my best :)

@AkshayChordiya
Copy link
Author

@krimin-killr21 Is this fixed?

@turing-tech
Copy link
Owner

Sorry, closed the wrong issue

@turing-tech turing-tech reopened this Mar 28, 2016
@AkshayChordiya
Copy link
Author

@MFlisar
Copy link
Contributor

MFlisar commented Jul 15, 2017

Any plans on fixing this @turing-tech ? Or any suggestion on how we can get this working?

I tried a few tricks but can't get this working in a satisfactory way

@turing-tech
Copy link
Owner

@MFlisar It is important, but unfortunately I have a significant workload as I'm working full-time as developer for a start-up. I will continue to fix critical issue, but anything beyond that I can't really work on right now. Hopefully when my work load goes back down I'll have time to fix all of the bugs. If any of you would like to submit a PR I'd be happy to take a look.

@MFlisar
Copy link
Contributor

MFlisar commented Jul 15, 2017

I tried a simple trick by putting the scrollbar outside of the coordinator like following:

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

	<android.support.design.widget.CoordinatorLayout
		android:id="@+id/clMain"
		android:layout_width="match_parent"
		android:layout_height="match_parent">

		<android.support.v7.widget.RecyclerView
			android:id="@+id/rvSidebar"
			android:layout_width="match_parent"
			android:layout_height="match_parent"
			app:layout_behavior="@string/appbar_scrolling_view_behavior" />


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

	<com.turingtechnologies.materialscrollbar.TouchScrollBar
		android:id="@+id/touchScrollBar"
		android:layout_width="16dp"
		android:layout_height="match_parent"
		android:layout_alignParentTop="true"
		android:layout_alignParentRight="true"
		android:layout_alignParentEnd="true"
		app:msb_recyclerView="@id/rvSidebar"
		app:msb_lightOnTouch="false" />

</RelativeLayout>

Problem: the problem here is that the scrollbar is consuming all touch events over the complete recycler view. Can I currently limit the scrollbar to only catch touches on the bar? I don't think so as far as I've seen...

Above would be no full solution but a fast work around for now at least

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants