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

Scroll RecyclerView when panel is at Anchored Point #980

Open
markvex20 opened this issue Mar 31, 2020 · 2 comments
Open

Scroll RecyclerView when panel is at Anchored Point #980

markvex20 opened this issue Mar 31, 2020 · 2 comments

Comments

@markvex20
Copy link

I need to scroll the panel when the panel is in anchored point position (mine is in the 35% of screen)
and also in full screen. I dont care if i can only drag it from the top part of it.
Here is my code:
ACTIVITYMAIN.xml
<?xml version="1.0" encoding="utf-8"?> <com.sothree.slidinguppanel.SlidingUpPanelLayout android:id="@+id/sliding_layout" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".activities.MainActivity" app:umanoDragView="@id/dragView" app:umanoScrollableView="@id/recyclerView" android:layout_gravity="bottom" android:gravity="bottom"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:name="com.example.fragments.MapFragment" android:id="@+id/mapFragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true"/> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/distanceBtn" android:src="@android:drawable/ic_dialog_info" android:layout_margin="@dimen/fab_margin" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </RelativeLayout> <LinearLayout android:id="@+id/dragView" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="false" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="68dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="16sp" android:text="Action"/> </RelativeLayout> <fragment android:name="com.example.fragments.ListFragment" android:id="@+id/fragmentId" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/> </LinearLayout> </com.sothree.slidinguppanel.SlidingUpPanelLayout>
The first fragment is a map and the second one a list that ill paste the following.
ListFragment.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" tools:context=".fragments.ListFragment"> <RelativeLayout android:layout_marginLeft="20sp" android:layout_weight="6" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Example" android:layout_centerVertical="true"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:layout_marginEnd="40dp" android:text="Example"/> </RelativeLayout> <RelativeLayout android:layout_marginLeft="20sp" android:layout_weight=".4" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical"/> </RelativeLayout> </LinearLayout>

And i have this in my MainActivity.java
SlidingUpPanelLayout slidingLayout = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout); slidingLayout.setAnchorPoint(0.35f);
Any ideas?

@markvex20 markvex20 changed the title Scroll RecyclerView when panel is in Anchored Point Scroll RecyclerView when panel is at Anchored Point Mar 31, 2020
@omkar-tenkale
Copy link

This contradicts the default beheviour

Still possible with new commits at
https://github.com/hannesa2/AndroidSlidingUpPanel/

U need to set maxexpandedratio or ssomething like that attribute

@fail572872916
Copy link

This contradicts the default beheviour

Still possible with new commits at
https://github.com/hannesa2/AndroidSlidingUpPanel/

U need to set maxexpandedratio or ssomething like that attribute

I don't see a property called MaxExpandeDratio in your library

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

3 participants