Giter Site home page Giter Site logo

scrollable's Issues

Proguard,can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath

Warning:ru.noties.scrollable.ScrollableScroller: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath
Warning:there were 1 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Exception while processing task
java.io.IOException: Please correct the above warnings first.Error:Execution failed for task
...
...

':app:packageRelease'.

Unable to compute hash of /Users/captain_miao/am/androidCode/trunk/treadmill/app/build/intermediates/classes-proguard/release/classes.jar

Closeup Logic

Hi,

Is it possible to implement CloseUpAlgorithm such that the header doesn't expand and hide automatically? What I mean is, when the header is fully expanded, if I move my finger upwards till the header is half of its original height and release my finger, the header doesn't collapse but remains as it is.

I'm very new to development with regards to touch events so I'd be grateful if you could point me in the right direction.

Thanks!

dude

Sorry for the noob question, i have activity with tabs, in have 3 tabs(3 fragments), i the first two i have recycler view, i need to set this {canscroll vertical}, i follow your sample, but this not work...

In fragments that i have recycler view, i implements CanScrollVerticallyDelegate, OnFlingOverListener methods:

override fun canScrollVertically(direction: Int): Boolean {
return recycler_view_relation.canScrollVertically(direction)
}

override fun onFlingOver(y: Int, duration: Long) {
        recycler_view_relation.smoothScrollBy(0, y)
} 

On activity i have: (nts top is my tabs)
scrollable_layout.setDraggableView(nts_top)

is correct?
And how to collpse on click

Problem scrolling Up

Hi!
I have a viewpager with only one fragment and inside this fragment a recyclerview. When i scroll down there is no problem, but when i want to scroll up until the top, the recyclerview is blocked and instead the ScrollableLayout scroll. I wish that the ScrollableLayout would scroll only after the recyclerview reached the top.

Problem with layout

I have

  • Header Image -
  • Taps layout -
  • ViewPager with Fragments -

When I scroll up to Taps layout, height of ViewPager still keep old height, ViewPager not fill to bottom of screen, so I can see other screen under.

Header height is not preserved after screen rotation

Hi. I noticed that the sample app does not preserve the header view height after screen rotation.

P.S. Thanks for the superb library, this is what I am just looking for! I am willing to contribute this library :)

Question

Nice work,but i want to know how to disable the sticky function?I just want to add a header for RecyclerView.

layout height problem with ViewPager

I use ScrollableLayout in a TabLayout+ViewPager,and ScrollableLayout has a LinearLayout(with Tablayout+ViewPager), if the ScrollableLayout in first page of tab,the height is ok,or else can see ScrollableLayout

Missing resources

strings.xml is missing min_friction_text
dimension.xml is missing max_friction_steps

So right now it isn't compiling until you add those :)

Direction variable not available in setCanScrollVerticallyDelegate

I am using your library to implement a sliding up panel layout which has a scrollable layout at its root and a view pager as a child which will show two fragments

the setCanScrollVerticallyDelegate method on debugging gave me the result that the direction variable doesnt have a value

Can you help me out please

there is Some Bug

if the scrollable_maxScroll larger than the screen height,it's scroll will have some problem.

my email :[email protected]

                                   ------------------------------- I'm so sorry , My Eglish is Not good.

No such property: GROUP for class

Error:FAILURE: Build failed with an exception.

  • Where:
    Script 'https://raw.githubusercontent.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' line: 48

  • What went wrong:
    A problem occurred configuring project ':app'.

    A problem occurred configuring project ':library'.
    No such property: GROUP for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

match_parent is not respected from second child

Hello,

I have a screen like this. I want to hide the header (including Tabs and "Kitapçık A B", excluding ActionBar) while scrolling to bottom.

screen shot 2015-04-04 at 11 34 59

I have implemented it like this.

<?xml version="1.0" encoding="utf-8"?>
<org.buraktamturk.loadingview.LoadingView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tf:lv_loading="false"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tf="http://schemas.android.com/apk/res-auto">
    <ru.noties.scrollable.ScrollableLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/scrollable_layout"
        tf:scrollable_maxScroll="96dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:orientation="vertical"
            android:layout_height="96dp">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:id="@+id/kitapcikLayout"
            android:background="?attr/colorPrimary"
            android:paddingLeft="11dp"
            android:paddingTop="5dp"

            android:orientation="horizontal">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:textSize="16sp"
                android:textColor="@android:color/white"
                android:text="@string/kitapcik" />

            <com.fem.tekno.utils.KitapciklarView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_gravity="center_vertical"
                android:id="@+id/kitapciklar"
                />

            </LinearLayout>
        <com.astuetz.PagerSlidingTabStrip
            android:id="@+id/tabs"
            android:layout_width="match_parent"
            android:textColorPrimary="@android:color/white"
            android:layout_height="56dp"
            android:background="?attr/colorPrimary" />
        </LinearLayout>

        <android.support.v4.view.ViewPager
            android:id="@+id/viewPager"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:layout_marginTop="96dp"
            />

    </ru.noties.scrollable.ScrollableLayout>
</org.buraktamturk.loadingview.LoadingView>

The final look when it scrolled down is this.

screen shot 2015-04-04 at 11 35 05

As presented above. There is 96dp (header's height) space between bottom of the device and end of the ViewPager.

Could you help me with removing the space?

Thanks,
Burak

use ScrollableLayout has a quickreturn

Hello,
thanks for this great lib.
Sometimes i would like to show header before scroll list.
I use this code :

     mScrollableLayout.setCanScrollVerticallyDelegate(new CanScrollVerticallyDelegate() {
            @Override
            public boolean canScrollVertically(int direction) {
                if(direction<0){
                    if(mScrollableLayout.getScrollY()==0){ //header is visible
                        return mListPlayers.canScrollVertically(direction);
                    }else{
                        return false;
                    }
                }
                return mListPlayers.canScrollVertically( direction);
            }
        });

Boolean return value seems to be ok, but i'm not able to scroll the list after scrollbarLayout scrolls to top without touch up and touch down.

What can I change to do that ?
Thanks.

View Pager not taking the complete height even on using "match parent"

Hi Dimitry,

Whenever I scroll up the scrollablelayout, there is a certain blank space left behind which I suppose belongs to the activity holding the view pager, can you please tell me what is wrong with my code.

My Activity Layout :

<include
    android:id="@+id/action_bar_points"
    layout="@layout/custom_action_bar_toolbar" />

<ru.noties.scrollable.ScrollableLayout
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"
android:id="@+id/scrollable_layout"
app:scrollable_autoMaxScroll="true"
app:scrollable_autoMaxScrollViewId="@+id/header"
app:scrollable_considerIdleMillis="125"
app:scrollable_friction="0.050"
app:scrollable_closeUpAnimationMillis="250"
app:scrollable_defaultCloseUp="true"
app:scrollable_scrollerFlywheel="false"
app:scrollable_closeUpAnimatorInterpolator="@android:anim/accelerate_decelerate_interpolator">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/points_parent"
    android:orientation="vertical"
    android:background="@color/app_bg">

<LinearLayout
    android:layout_width="fill_parent"
    android:orientation="vertical"
    android:id="@+id/header"
    android:layout_height="wrap_content">

        <RelativeLayout
            android:layout_width="140dp"
            android:layout_height="140dp"
            android:background="@drawable/circle_my_points_bg"
            android:layout_marginTop="@dimen/margin15dp"
            android:layout_marginBottom="@dimen/margin15dp"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:id="@+id/circular_relative_view">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/star_icon"
                android:text=""
                android:layout_centerHorizontal="true"
                android:layout_marginTop="@dimen/margin10dp"
                android:padding="@dimen/margin5dp"
                android:textSize="16sp"
                android:textColor="@color/orange_text"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/level_text_points"
                android:layout_below="@id/star_icon"
                android:layout_centerHorizontal="true"
                android:text=""
                android:layout_marginTop="@dimen/margin5dp"
                fontPath="fonts/Gotham-XLight.otf"
                android:textSize="16sp"
                android:textColor="@color/orange_text"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/level_points"
                android:layout_below="@id/level_text_points"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="@dimen/margin10dp"
                android:text="9400"
                fontPath="fonts/Gotham-XLight.otf"
                android:textSize="20sp"
                android:textColor="@color/black"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/reward_points_text"
                android:layout_below="@id/level_points"
                android:layout_centerHorizontal="true"
                android:text=""
                android:padding="4dp"
                fontPath="fonts/Gotham-XLight.otf"
                android:textSize="12sp"
                android:textColor="@color/black"/>

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:id="@+id/points_indicator"
            android:layout_below="@id/circular_relative_view"
            android:layout_marginTop="@dimen/margin20dp"
            android:padding="@dimen/margin5dp"
            android:visibility="gone">
        </RelativeLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/light_gray"
            android:layout_marginTop="@dimen/margin15dp"
            android:layout_marginLeft="@dimen/margin10dp"
            android:layout_marginRight="@dimen/margin10dp"
            android:layout_below="@id/points_indicator"/>

    </LinearLayout>

             <android.support.design.widget.TabLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/points_tablayout"
                app:tabMode="fixed"
                app:tabGravity="fill"
                app:tabIndicatorColor="@color/app_bg"
                app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
                app:tabSelectedTextColor="@color/orange_text"
                app:tabTextColor="@color/black"/>

            <android.support.v4.view.ViewPager
                android:id="@+id/points_viewpager"
                android:layout_width="match_parent"
                android:layout_height="fill_parent"
                android:background="@color/app_bg"
                android:layout_below="@id/points_tablayout"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
               />

    </LinearLayout>
</ru.noties.scrollable.ScrollableLayout>

Viewpager fragment 1:

?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/redeem_recyclerview"
android:background="@color/app_bg"
android:clipToPadding="false"
android:numColumns="auto_fit"
android:padding="@dimen/item_offset"/>

dependencies problem

dependencies does not prompt for errors, it is also synchronized, but you can't find the class dependencies {
compile 'ru.noties:scrollable:1.3.0' } Restart, still not in effect

scroll bug

when you are scrolling beveled, the header and the content will not scroll together

Scrolling is slow and lagy

I am using a recyclerView and if I scroll and after let it free to scroll itself, the move is very slow with a lot of friction.
ezgif com-gif-maker

Disable all logs

how to disable all logs
D/InputEventConsistencyVerifier: TouchEvent: ACTION_MOVE contained 1 pointers but there are currently 0 pointers down.
in ru.noties.scrollable.ScrollableLayout@b552f9f0
0: sent at 8776594648936, MotionEvent { action=ACTION_MOVE, id[0]=0, x[0]=128.0, y[0]=97.18901, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=1, eventTime=8776594, downTime=8776490, deviceId=0, source=0x1002 }
-- recent events --
1: sent at 8776594648936, (unhandled) MotionEvent { action=ACTION_CANCEL, id[0]=0, x[0]=128.0, y[0]=97.18901, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=1, eventTime=8776594, downTime=8776490, deviceId=0, source=0x1002 }
2: sent at 8776577982270, MotionEvent { action=ACTION_CANCEL, id[0]=0, x[0]=128.0, y[0]=90.14987, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=1, eventTime=8776577, downTime=8776490, deviceId=0, source=0x1002 }
3: sent at 8776561315604, MotionEvent { action=ACTION_MOVE, id[0]=0, x[0]=128.0, y[0]=84.162964, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=1, eventTime=8776561, downTime=8776490, deviceId=0, source=0x1002 }
4: sent at 8776490710000, MotionEvent { action=ACTION_MOVE, id[0]=0, x[0]=128.0, y[0]=82.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=8776490, downTime=8776490, deviceId=0, source=0x1002 }
5: sent at 8776490065000, MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=127.0, y[0]=79.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=8776490, downTime=8776490, deviceId=0, source=0x1002 }

Not Support Toolbar

use toolbar will stay two toolbar height ,one is toolbar ,another is white background whitout noting.like this
qq20150603-1

because the ScrollLayout method onLayout , child onLayout with childTop use the given top.
if use given top = 0 , the issue will be solved. should you fix it ? thx
code :
@OverRide
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
int childTop = top;
// should use
//childTop = 0;
for (int i = 0; i < getChildCount(); i++) {
final View view = getChildAt(i);
view.layout(left, childTop, right, childTop + view.getMeasuredHeight());
childTop += view.getMeasuredHeight();
}
}

when Scrolling the page,the headerview can scroll also

In FragmentPager,when Scrolling the page,the headerview can scroll also,and the page restored to its original position.I dont want the headerview to scroll or the page restored to its original position,how to solve it,Thanks

Scroll in header area.

Hi Dimitry,
sorry to disturb you again.
in my layout,i got a complex header view longer than the screen height,which has ImageView,ViewPager etc.all of the cell views in header are clickable.
it seems a little lag during scroll,unless the TabsLayout is sticky.
you can add a couple of TextViews in a vertical linearlayout header,and every TextView has a click listener.

nested two page bug

When nested match_parent FrameLayout and recyclerview match_parent slide down the normal drop-down, recyclerview cannot scroll, and recyclerview is no longer recyclerview

NoClassDefError for ScrollableLayout

Used design support library in my project , while using scrollable layout getting error as

Error:
java.lang.NoClassDefFoundError: ru.noties.scrollable.ScrollableLayout$2
at ru.noties.scrollable.ScrollableLayout.(ScrollableLayout.java:521)

Is there any solution for it?
I have used design support library with version 23.1.1

Thanks

HeaderView Issue

@noties : Header view is going inside the toolbar , i need to make header view below the toolbar with size variation as on scroll up size should get reduce and on scroll down size should get increase.
review_screen

Hiding/Showing Header Not Working

Thanks for this API.

I implemented a logic whereby I hide the header when a particular ViewPager tab is selected. I do this inside the onPageSelected, but it doesn't seems to work but it works inside the currently showing ViewPager Tab Fragment onResume.

Please how do I resolve this so that it works in the viewpager onPageSelected function.

Issue while fast scrolling vertically

First thanks alot for that wonderful efforts
.My issue is when I fast scrolling vertically its scrolling not smooth as compared to scroll slowly vertically.
Please suggest something.

Issue scrolling the list/recyclview down

Whenever I scroll down, the header scrolls and becomes visible; but I have to release and scroll down again for the scrolling to continue.

How do I change this behavior such that with one scroll down/drag down the header will show while the list will still continue to scroll down.

ScrollHeader is not smoothly

When I want top a page, I use scrollTo(0, 0), it back to top without animator. Could you help me it smoothly? Thank you

Not able to get all library views

How can i get 'ru.noties.scrollable.sample.SampleHeaderView' ? I have added compile 'ru.noties:scrollable:1.3.0' but not able to get SampleHeaderView .

How to add Toolbar in xml ?

if my app use theme

<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">

how to make sticky toolbar in xml ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.