Giter Site home page Giter Site logo

Comments (1)

noties avatar noties commented on May 29, 2024

Hey!
I think that you need to put your +@id/header the first child in the ScrollableLayout. Something like this:

<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="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="#ff0"
            android:layout_marginTop="15dip"
            android:layout_marginBottom="15dip"
            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="10dip"
                android:padding="5dip"
                android:textSize="16sp"
                android:textColor="#f00"/>

            <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="5dip"
                android:textSize="16sp"
                android:textColor="#f00"/>

            <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="10dip"
                android:text="9400"
                android:textSize="20sp"
                android:textColor="#000"/>

            <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"
                android:textSize="12sp"
                android:textColor="#000"/>

        </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="20dip"
            android:padding="5dip"
            android:visibility="gone">
        </RelativeLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="#ccc"
            android:layout_marginTop="15dip"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="10dip"
            android:layout_below="@id/points_indicator"/>

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

        <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:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
            app:tabSelectedTextColor="#f00"
            app:tabTextColor="#000"/>

        <android.support.v4.view.ViewPager
            android:id="@+id/points_viewpager"
            android:layout_width="match_parent"
            android:layout_height="fill_parent"
            android:layout_below="@id/points_tablayout"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
    </LinearLayout>
    
</ru.noties.scrollable.ScrollableLayout>

from scrollable.

Related Issues (20)

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.