An android library for section headers that stick to the top

Overview

StickyListHeaders

StickyListHeaders is an Android library that makes it easy to integrate section headers in your ListView. These section headers stick to the top like in the new People app of Android 4.0 Ice Cream Sandwich. This behavior is also found in lists with sections on iOS devices. This library can also be used without the sticky functionality if you just want section headers.

StickyListHeaders actively supports android versions 2.3 (gingerbread) and above. That said, it works all the way down to 2.1 but is not actively tested or working perfectly.

Here is a short gif showing the functionality you get with this library:

alt text

Goal

The goal of this project is to deliver a high performance replacement to ListView. You should with minimal effort and time be able to add section headers to a list. This should be done via a simple to use API without any special features. This library will always priorities general use cases over special ones. This means that the library will add very few public methods to the standard ListView and will not try to work for every use case. While I will want to support even narrow use cases I will not do so if it compromises the API or any other feature.

Installing

###Maven Add the following maven dependency exchanging x.x.x for the latest release.

<dependency>
    <groupId>se.emilsjolander</groupId>
    <artifactId>stickylistheaders</artifactId>
    <version>x.x.x</version>
</dependency>

###Gradle Add the following gradle dependency exchanging x.x.x for the latest release.

dependencies {
    compile 'se.emilsjolander:stickylistheaders:x.x.x'
}

###Cloning First of all you will have to clone the library.

git clone https://github.com/emilsjolander/StickyListHeaders.git

Now that you have the library you will have to import it into Android Studio. In Android Studio navigate the menus like this.

File -> Import Project ...

In the following dialog navigate to StickyListHeaders which you cloned to your computer in the previous steps and select the build.gradle.

Getting Started

###Base usage

Ok lets start with your activities or fragments xml file. It might look something like this.

<se.emilsjolander.stickylistheaders.StickyListHeadersListView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Now in your activities onCreate() or your fragments onCreateView() you would want to do something like this

StickyListHeadersListView stickyList = (StickyListHeadersListView) findViewById(R.id.list);
MyAdapter adapter = new MyAdapter(this);
stickyList.setAdapter(adapter);

MyAdapter in the above example would look something like this if your list was a list of countries where each header was for a letter in the alphabet.

public class MyAdapter extends BaseAdapter implements StickyListHeadersAdapter {

    private String[] countries;
    private LayoutInflater inflater;

    public MyAdapter(Context context) {
        inflater = LayoutInflater.from(context);
        countries = context.getResources().getStringArray(R.array.countries);
    }

    @Override
    public int getCount() {
        return countries.length;
    }

    @Override
    public Object getItem(int position) {
        return countries[position];
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override 
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;

        if (convertView == null) {
            holder = new ViewHolder();
            convertView = inflater.inflate(R.layout.test_list_item_layout, parent, false);
            holder.text = (TextView) convertView.findViewById(R.id.text);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        holder.text.setText(countries[position]);

        return convertView;
    }

    @Override 
    public View getHeaderView(int position, View convertView, ViewGroup parent) {
        HeaderViewHolder holder;
        if (convertView == null) {
            holder = new HeaderViewHolder();
            convertView = inflater.inflate(R.layout.header, parent, false);
            holder.text = (TextView) convertView.findViewById(R.id.text);
            convertView.setTag(holder);
        } else {
            holder = (HeaderViewHolder) convertView.getTag();
        }
        //set header text as first char in name
        String headerText = "" + countries[position].subSequence(0, 1).charAt(0);
        holder.text.setText(headerText);
        return convertView;
    }

    @Override
    public long getHeaderId(int position) {
        //return the first character of the country as ID because this is what headers are based upon
        return countries[position].subSequence(0, 1).charAt(0);
    }

    class HeaderViewHolder {
        TextView text;
    }

    class ViewHolder {
        TextView text;
    }
    
}

That's it! Look through the API docs below to get know about things to customize and if you have any problems getting started please open an issue as it probably means the getting started guide need some improvement!

###Styling

You can apply your own theme to StickyListHeadersListViews. Say you define a style called Widget.MyApp.ListView in values/styles.xml:

<resources>
    <style name="Widget.MyApp.ListView" parent="@android:style/Widget.ListView">
        <item name="android:paddingLeft">@dimen/vertical_padding</item>
        <item name="android:paddingRight">@dimen/vertical_padding</item>
    </style>
</resources>

You can then apply this style to all StickyListHeadersListViews by adding something like this to your theme (e.g. values/themes.xml):

<resources>
    <style name="Theme.MyApp" parent="android:Theme.NoTitleBar">
        <item name="stickyListHeadersListViewStyle">@style/Widget.MyApp.ListView</item>
    </style>
</resources>

###Expandable support Now, you can use ExpandableStickyListHeadersListView to expand/collapse subitems. xml first

<se.emilsjolander.stickylistheaders.ExpandableStickyListHeadersListView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Then you need to setup your listview on onCreate() or onCreateView()

ExpandableStickyListHeadersListView expandableStickyList = (ExpandableStickyListHeadersListView) findViewById(R.id.list);
StickyListHeadersAdapter adapter = new MyAdapter(this);
expandableStickyList.setAdapter(adapter);
expandableStickyList.setOnHeaderClickListener(new StickyListHeadersListView.OnHeaderClickListener() {
            @Override
            public void onHeaderClick(StickyListHeadersListView l, View header, int itemPosition, long headerId, boolean currentlySticky) {
                if(expandableStickyList.isHeaderCollapsed(headerId)){
                    expandableStickyList.expand(headerId);
                }else {
                    expandableStickyList.collapse(headerId);
                }
            }
        });

As you see, MyAdapter is just a StickyListHeadersAdapter which is mentioned in the previous section. You needn't do any more extra operations.

There are three important functions: isHeaderCollapsed(long headerId),expand(long headerId) and collapse(long headerId).

The function isHeaderCollapsed is used to check whether the subitems belonging to the header have collapsed. You can call expand or collapse method to hide or show subitems. You can also define a AnimationExecutor which implements ExpandableStickyListHeadersListView.IAnimationExecutor, and put it into the ExpandableStickyListHeadersListView by setAnimExecutor method,if you want more fancy animation when hiding or showing subitems.

Upgrading from 1.x versions

First of all the package name has changed from com.emilsjolander.components.stickylistheaders -> se.emilsjolander.stickylistheaders so update all your imports and xml files using StickyListHeaders!

If you are Upgrading from a version prior to 2.x you might run into the following problems.

  1. StickyListHeadersListView is no longer a ListView subclass. This means that it cannot be passed into a method expecting a ListView. You can retrieve an instance of the ListView via getWrappedList() but use this with caution as things will probably break if you start setting things directly on that list.
  2. Because StickyListHeadersListView is no longer a ListView it does not support all the methods. I have implemented delegate methods for all the usual methods and gladly accept pull requests for more.

API

###StickyListHeadersAdapter

public interface StickyListHeadersAdapter extends ListAdapter {
    View getHeaderView(int position, View convertView, ViewGroup parent);
    long getHeaderId(int position);
}

Your adapter must implement this interface to function with StickyListHeadersListView. getHeaderId() must return a unique integer for every section. A valid implementation for a list with alphabetical sections is the return the char value of the section that position is a part of.

getHeaderView() works exactly like getView() in a regular ListAdapter.

###StickyListHeadersListView Headers are sticky by default but that can easily be changed with this setter. There is of course also a matching getter for the sticky property.

public void setAreHeadersSticky(boolean areHeadersSticky);
public boolean areHeadersSticky();

A OnHeaderClickListener is the header version of OnItemClickListener. This is the setter for it and the interface of the listener. The currentlySticky boolean flag indicated if the header that was clicked was sticking to the top at the time it was clicked.

public void setOnHeaderClickListener(OnHeaderClickListener listener);

public interface OnHeaderClickListener {
    public void onHeaderClick(StickyListHeadersListView l, View header, int itemPosition, long headerId, boolean currentlySticky);
}

A OnStickyHeaderOffsetChangedListener is a Listener used for listening to when the sticky header slides out of the screen. The offset parameter will slowly grow to be the same size as the headers height. Use the listeners callback to transform the header in any way you see fit, the standard android contacts app dims the text for example.

public void setOnStickyHeaderOffsetChangedListener(OnStickyHeaderOffsetChangedListener listener);

public interface OnStickyHeaderOffsetChangedListener {
    public void onStickyHeaderOffsetChanged(StickyListHeadersListView l, View header, int offset);
}

A OnStickyHeaderChangedListener listens for changes to the header. This enables UI elements elsewhere to react to the current header (e.g. if each header is a date, then the rest of the UI can update when you scroll to a new date).

public void setOnStickyHeaderChangedListener(OnStickyHeaderChangedListener listener);

public interface OnStickyHeaderChangedListener {
    void onStickyHeaderChanged(StickyListHeadersListView l, View header, int itemPosition, long headerId);
}

Here are two methods added to the API for inspecting the children of the underlying ListView. I could not override the normal getChildAt() and getChildCount() methods as that would mess up the underlying measurement system of the FrameLayout wrapping the ListView.

public View getListChildAt(int index);
public int getListChildCount();

This is a setter and getter for an internal attribute that controls if the list should be drawn under the stuck header. The default value is true. If you do not want to see the list scroll under your header you will want to set this attribute to false.

public void setDrawingListUnderStickyHeader(boolean drawingListUnderStickyHeader);
public boolean isDrawingListUnderStickyHeader();

If you are using a transparent action bar the following getter+setter will be very helpful. Use them to set the position of the sticky header from the top of the view.

public void setStickyHeaderTopOffset(int stickyHeaderTopOffset);
public int getStickyHeaderTopOffset();

Get the amount of overlap the sticky header has when position in on the top of the list.

public int getHeaderOverlap(int position);

Contributing

Contributions are very welcome. Now that this library has grown in popularity i have a hard time keeping upp with all the issues while tending to a multitude of other projects as well as school. So if you find a bug in the library or want a feature and think you can fix it yourself, fork + pull request and i will greatly appreciate it!

I love getting pull requests for new features as well as bugs. However, when it comes to new features please also explain the use case and way you think the library should include it. If you don't want to start coding a feature without knowing if the feature will have chance of being included, open an issue and we can discuss the feature!

Comments
  • Significant performance degradation with current version of the library

    Significant performance degradation with current version of the library

    This is hard to qualify, but the previous (before re-write) library provided butter smooth scrolling of my list, but the current one is terribly choppy.

    Putting back the old library restores the butter smooth performance.

    When I very slowly scroll the list, I notice that when it switches the "sticky" header, there is a visible pause. It's a least 1/10 second long on one of my lists. There is no such pause with the old library and the headers transition smoothly.

    Anybody else getting this?

    bug priority 
    opened by androidmoney 26
  • Fix for a bunch of issues

    Fix for a bunch of issues

    Amend:

    private boolean isCalledFromSuper() {
        // i feel dirty...
        // could not think if better way, need to translate positions when not
        // called from super
        StackTraceElement callingFrame = Thread.currentThread().getStackTrace()[5];
        return callingFrame.getClassName().contains("android.widget.AbsListView") || 
               callingFrame.getClassName().contains("android.widget.ListView") ||
               callingFrame.getClassName().contains("com.emilsjolander.components.stickylistheaders.StickyListHeadersListView") ||
               callingFrame.getClassName().contains("android.widget.FastScroller");
    }
    

    This should fix a bunch of things including setSelection(), fast scrolling, etc.

    opened by androidmoney 21
  • Combination with FadingActionBar possible?

    Combination with FadingActionBar possible?

    Hi! I try to combine your sticky headers with a fading action bar as in FadingActionBar library. The problem is, that the headers "stick" behind the opaque action bar (because the action bar starts out transparent and fades to opaque) - which is of course contradicting the purpose of stuck headers. I would need to tell your list to stick the headers right below the action bar even though the original measurement gives your list the impression it has more room on top which it kind of loses when the user scrolls down. Is that possible? Do you see a way to maybe tell the headers where exactly to stick? Thanks! Olaf

    enhancement 
    opened by Zordid 19
  • There is an issue with View reuse

    There is an issue with View reuse

    I don't know what the problem is, but there is some kind of problem with Vew recycle. I sent my app with StickyListHeaders to a beta tester and he reported that on his Droid Razr, sometimes the list displays the wrong data. I cannot duplicate it on my Galaxy Nexus, but when I sent him the same code where the only change was it used a normal ListView, the problem went away for him. So there is some issue StickyListHeaders. Don't know what it is, but I figured I'd throw it out there in case you feel like taking a second peek.

    bug 
    opened by androidmoney 19
  • SectionIndexer indicator is drawn under sticky header

    SectionIndexer indicator is drawn under sticky header

    The indicator showing the section when fast scroll is enabled is drawn under the sticky header. This is really only visible when the SectionIndexer indicator is at the top of the list

    bug 
    opened by emilsjolander 18
  • When using a CursorAdapter, headers don't stick the

    When using a CursorAdapter, headers don't stick the "first time around"

    I am using the following pattern throughout my app:

    onCrate(): set an empty CursorAdapter on my listView

    onResume(): set an actual Cursor object via changeCursor()

    The first time in, the headers are shown, but they don't stick. If I then call changeCursor() again with a new cursor, the headers begin to stick.

    bug 
    opened by androidmoney 18
  • Continuous getHeaderId(int position) calls.

    Continuous getHeaderId(int position) calls.

    I have a fork of this project that is a month old, at some point from this implementation until now this issue was introduced.

    The getHeaderId(int position) method is called continuously. If you add a logging statement in the method its easy to see. I would recommend against unneeded calls to make the UX experience smoother.

    opened by jjNford 18
  • If list position is retained on rotation header get unstuck

    If list position is retained on rotation header get unstuck

    If I store the position of the listview in saved instance state and then rotate and set selection of the listview the header is back to the top of the list and scrolls with the list, the issue is fixed if I scroll back upt to the top of the list and then rotate.

    bug 
    opened by akshaydashrath 18
  • Added a method to StickyHeadersListView to get the item View of a list i...

    Added a method to StickyHeadersListView to get the item View of a list i...

    Added a method to StickyHeadersListView to get the item View of a list item. This returns just the item View, without a header attached. Useful for something like animating a list item, where you just need the item view, with no header.

    opened by josh-burton 16
  • Bug when first row has no header

    Bug when first row has no header

    Modify the sample app the following way:

    TestBaseAdpater.getHeaderView()

    replace

        holder.text.setText(countries[position].subSequence(0, 1));
    

    with the following to hide the header for the first section:

        CharSequence firstChar = countries[position].subSequence(0, 1);
        if (!firstChar.equals("A")) {
            holder.text.setVisibility(View.VISIBLE);
            holder.text.setText(firstChar);
        } else
            holder.text.setVisibility(View.GONE);
    

    Remove the padding around the header layout:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#640000ff"
    android:orientation="horizontal">
    

    Run the sample app. As you can see, B and the other headers are not shown correctly as you scroll down.

    If the "A" is shown, everything works as expected.

    enhancement 
    opened by androidmoney 16
  • Headers get extremely big or disappear

    Headers get extremely big or disappear

    When i use the list view as content in the drawer or as menu, the sticky items do not work at all. I attached screenshots - sorry for the censoring but i cant give out the information.

    I tried HEAD and, v2.0.0. I am using the v4 drawer layout and the v7 actionbar. The app is tested on a nexus4 (4.3 fully updated, nothing modified)

    Note that on the second screenshot the grey area is the first header (T...), I checked that with a click listener. I dug into the code but didn't find anything, otherwise I'd have sent a patch. If you have an idea where this goes wrong, and point me to some sourcecode, I'll try fix it. The menu drawer has the exact same problems.

    screenshot_2013-10-03-01-20-08 screenshot_2013-10-03-01-20-22 screenshot_2013-10-03-01-20-28

    opened by meredrica 15
  • Handling non empty state of parent class is not implemented

    Handling non empty state of parent class is not implemented

    Hi

    I am using your library and starting to experience a new issue out of the blue. The exception details are below.

    Fatal Exception: java.lang.IllegalStateException Handling non empty state of parent class is not implemented se.emilsjolander.stickylistheaders.StickyListHeadersListView.onSaveInstanceState (StickyListHeadersListView.java:1098) android.view.View.dispatchSaveInstanceState (View.java:20984) android.view.ViewGroup.dispatchSaveInstanceState (ViewGroup.java:3975) android.view.View.saveHierarchyState (View.java:20967) androidx.fragment.app.FragmentStateManager.saveViewState (FragmentStateManager.java:721) androidx.fragment.app.FragmentStateManager.saveBasicState (FragmentStateManager.java:690) androidx.fragment.app.FragmentStateManager.saveState (FragmentStateManager.java:649) androidx.fragment.app.FragmentStore.saveActiveFragments (FragmentStore.java:177) androidx.fragment.app.FragmentManager.saveAllState (FragmentManager.java:2655) androidx.fragment.app.Fragment.performSaveInstanceState (Fragment.java:3153) androidx.fragment.app.FragmentStateManager.saveBasicState (FragmentStateManager.java:683) androidx.fragment.app.FragmentStateManager.saveState (FragmentStateManager.java:649) androidx.fragment.app.FragmentStore.saveActiveFragments (FragmentStore.java:177) androidx.fragment.app.FragmentManager.saveAllState (FragmentManager.java:2655) androidx.fragment.app.FragmentController.saveAllState (FragmentController.java:152) androidx.fragment.app.FragmentActivity$1.saveState (FragmentActivity.java:133) androidx.savedstate.SavedStateRegistry.performSave (SavedStateRegistry.java:227) androidx.savedstate.SavedStateRegistryController.performSave (SavedStateRegistryController.java:74) androidx.activity.ComponentActivity.onSaveInstanceState (ComponentActivity.java:314)

    opened by Hiten1984 4
  • Rename gradle-mvn-push.gradle to gradle-mvn-push.gradle.

    Rename gradle-mvn-push.gradle to gradle-mvn-push.gradle.

    /*

    • Copyright 2013 Chris Banes
    • Licensed under the Apache License, Version 2.0 (the "License");
    • you may not use this file except in compliance with the License.
    • You may obtain a copy of the License at
    • http://www.apache.org/licenses/LICENSE-2.0
      
    • Unless required by applicable law or agreed to in writing, software
    • distributed under the License is distributed on an "AS IS" BASIS,
    • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    • See the License for the specific language governing permissions and
    • limitations under the License. */

    apply plugin: 'maven' apply plugin: 'signing'

    def isReleaseBuild() { return VERSION_NAME.contains("SNAPSHOT") == false }

    def getReleaseRepositoryUrl() { return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" }

    def getSnapshotRepositoryUrl() { return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL : "https://oss.sonatype.org/content/repositories/snapshots/" }

    def getRepositoryUsername() { return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" }

    def getRepositoryPassword() { return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" }

    afterEvaluate { project -> uploadArchives { repositories { mavenDeployer { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

                pom.groupId = GROUP
                pom.artifactId = POM_ARTIFACT_ID
                pom.version = VERSION_NAME
    
                repository(url: getReleaseRepositoryUrl()) {
                    authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
                }
                snapshotRepository(url: getSnapshotRepositoryUrl()) {
                    authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
                }
    
                pom.project {
                    name POM_NAME
                    packaging POM_PACKAGING
                    description POM_DESCRIPTION
                    url POM_URL
    
                    scm {
                        url POM_SCM_URL
                        connection POM_SCM_CONNECTION
                        developerConnection POM_SCM_DEV_CONNECTION
                    }
    
                    licenses {
                        license {
                            name POM_LICENCE_NAME
                            url POM_LICENCE_URL
                            distribution POM_LICENCE_DIST
                        }
                    }
    
                    developers {
                        developer {
                            id POM_DEVELOPER_ID
                            name POM_DEVELOPER_NAME
                            email POM_DEVELOPER_EMAIL
                        }
                    }
                }
            }
        }
    }
    
    signing {
        required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
        sign configurations.archives
    }
    
    task androidJavadocs(type: Javadoc) {
        failOnError = false
        source = android.sourceSets.main.java.source
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    }
    
    task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
        classifier = 'javadoc'
        from androidJavadocs.destinationDir
    }
    
    task androidSourcesJar(type: Jar) {
        classifier = 'sources'
        from android.sourceSets.main.java.source
    }
    
    artifacts {
        archives androidSourcesJar
        archives androidJavadocsJar
    }
    

    }

    opened by nawafo070o 0
  • Not compatible with Android 10

    Not compatible with Android 10

    Version used of library: 2.7.0 Android Gradle version: 3.5.0

    App crashes when targetting API 29:

    2019-09-04 14:20:37.302 17366-17366/XXX: Accessing hidden field Landroid/widget/AbsListView;->mSelectorRect:Landroid/graphics/Rect; (greylist-max-p, reflection, denied) 2019-09-04 14:20:37.303 17366-17366/XXX W/System.err: java.lang.NoSuchFieldException: No field mSelectorRect in class Landroid/widget/AbsListView; (declaration of 'android.widget.AbsListView' appears in /system/framework/framework.jar!classes3.dex) 2019-09-04 14:20:37.303 17366-17366/XXX W/System.err: at java.lang.Class.getDeclaredField(Native Method) 2019-09-04 14:20:37.303 17366-17366/XXX W/System.err: at se.emilsjolander.stickylistheaders.WrapperViewList.(WrapperViewList.java:35) 2019-09-04 14:20:37.303 17366-17366/XXX W/System.err: at se.emilsjolander.stickylistheaders.StickyListHeadersListView.(StickyListHeadersListView.java:129)

    opened by alixwar 4
  • adding footer not working

    adding footer not working

    View footer = getLayoutInflater().inflate(R.layout.footer, null); listView.addFooterView(footer, null, false);

    i just add footer to the sticky listView but i cant see it

    opened by medozeus 0
  • Fatal Exception: java.lang.ClassCastException android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams

    Fatal Exception: java.lang.ClassCastException android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams

    Version of SDK:

    'se.emilsjolander:stickylistheaders:2.7.0'

    Operating systems:

    • 9

    Device models:

    • OnePlus 5T,

    • Samsung Galaxy S8

    Steps to reproduce: /

    Expected behavior: /

    Crashlytics log:

    Fatal Exception: java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams at android.widget.ListView.removeUnusedFixedViews + 2157(ListView.java:2157) at android.widget.ListView.layoutChildren + 1983(ListView.java:1983) at se.emilsjolander.stickylistheaders.WrapperViewList.layoutChildren + 193(WrapperViewList.java:193) at android.widget.AbsListView.onLayout + 2991(AbsListView.java:2991) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at se.emilsjolander.stickylistheaders.StickyListHeadersListView.onLayout + 265(StickyListHeadersListView.java:265) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout + 446(ActionBarOverlayLayout.java:446) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.LinearLayout.setChildFrame + 1812(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical + 1656(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout + 1565(LinearLayout.java:1565) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren + 323(FrameLayout.java:323) at android.widget.FrameLayout.onLayout + 261(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout + 1041(DecorView.java:1041) at android.view.View.layout + 22407(View.java:22407) at android.view.ViewGroup.layout + 6579(ViewGroup.java:6579) at android.view.ViewRootImpl.performLayout + 3343(ViewRootImpl.java:3343) at android.view.ViewRootImpl.performTraversals + 2807(ViewRootImpl.java:2807) at android.view.ViewRootImpl.doTraversal + 1853(ViewRootImpl.java:1853) at android.view.ViewRootImpl$TraversalRunnable.run + 8476(ViewRootImpl.java:8476) at android.view.Choreographer$CallbackRecord.run + 949(Choreographer.java:949) at android.view.Choreographer.doCallbacks + 761(Choreographer.java:761) at android.view.Choreographer.doFrame + 696(Choreographer.java:696) at android.view.Choreographer$FrameDisplayEventReceiver.run + 935(Choreographer.java:935) at android.os.Handler.handleCallback + 873(Handler.java:873) at android.os.Handler.dispatchMessage + 99(Handler.java:99) at android.os.Looper.loop + 214(Looper.java:214) at android.app.ActivityThread.main + 7045(ActivityThread.java:7045) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 493(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main + 964(ZygoteInit.java:964)

    opened by markokatic0001 2
Releases(2.7.0)
Owner
Emil Sjölander
Emil Sjölander
A small android library for tagging views inside a ScrollView as "sticky" making them stick to the top of the scroll container until a new sticky view comes and takes it's place

StickyScrollViewItems StickyScrollViewItems is a ScrollView subclass that allowed you to mark items inside the ScrollView as sticky. The items marked

Emil Sjölander 1k Jan 7, 2023
This is a very simple library for Android that allows you to stick an header to a scrollable view and easily apply animation to it

StikkyHeader This is a very simple library for Android that allows you to stick an header to a ListView and easily apply animation to it Usage To use

Carlo Marinangeli 847 Dec 30, 2022
Android ListView with sticky headers

DEPRECATED HeaderListView is deprecated. No new development will be taking place. Quickstart Import the HeaderListView module in your Android Studio p

Applidium 314 Nov 10, 2022
An open source Android library that provides a floating group view at the top of the ExpandableListView

FloatingGroupExpandableListView FloatingGroupExpandableListView is a huge name an open source Android library that provides a floating group view (aka

Diego Lima 376 Nov 28, 2022
Android library to observe scroll events on scrollable views.

Android-ObservableScrollView Android library to observe scroll events on scrollable views. It's easy to interact with the Toolbar introduced in Androi

Soichiro Kashima 9.6k Dec 30, 2022
Android library to achieve in an easy way, the behaviour of the home page in the Expedia app, with a pair of auto-scroll circular parallax ListViews.

ListBuddies This library is not maintained anymore and there will be no further releases Android library of a pair of auto-scroll circular parallax Li

JPARDOGO 970 Dec 29, 2022
Android library to display a ListView whose cells are not rigid but flabby and react to ListView scroll.

FlabbyListView This library is not maintained anymore and there will be no further releases Android library to display a ListView which cells are not

JPARDOGO 762 Nov 23, 2022
Android library that allows you to bind a LinearLayout with a ListAdapter.

LinearListView Android library that allows you to bind a LinearLayout with a ListAdapter. Download Gradle: dependencies { compile 'com.github.franki

Francesco Sardo 571 Dec 22, 2022
An easy to use Drag & Drop List for Android. Direct replacement of the android ListView.

DragNDropListView DragNDropListView is a direct replacement for the stock Android ListView. If you know how to use ListView, you already know how to u

null 187 Dec 22, 2022
Easy to use ListView with pinned sections for Android.

Easy to use ListView with pinned sections for Android 2.1 and higher. Pinned section is a header view which sticks to the top of the list until at lea

Sergej Shafarenka 2.6k Dec 21, 2022
This project aims to provide a reusable pull to refresh widget for Android.

Pull To Refresh for Android Note This library is deprecated, a swipe refresh layout is available in the v4 support library. This project aims to provi

Johan Berg 2.5k Jan 2, 2023
An Android custom ListView and ScrollView with pull to zoom-in.

PullZoomView An Android custom ListView and ScrollView with pull to zoom-in. Features Set ZoomView enable Add HeaderView Custom ZoomView Parallax or N

Frank-Zhu 2.3k Dec 26, 2022
Lazy load of images in Android

LazyList A simple library to display images in Android ListView. Images are being downloaded asynchronously in the background. Images are being cached

Fedor Vlasov 1.2k Nov 15, 2022
Android widget with pull to refresh for all the views,and support loadMore for ListView , RecyclerView, GridView and SwipeRefreshLayout.

CommonPullToRefresh Android widget with pull to refresh for all the views,and support loadMore for ListView,RecyclerView,GridView and SwipeRefreshLayo

null 1.1k Nov 10, 2022
HorizontalListView is an Android ListView widget which scrolls in a horizontal manner (in contrast with the SDK-provided ListView which scrolls vertically).

HorizontalListView HorizontalListView is an Android ListView widget which scrolls in a horizontal manner (in contrast with the SDK-provided ListView w

MeetMe 722 Nov 10, 2022
Horizontal list view for Android which allows variable items widths

Deprecated This widget is now deprecated and it won't be updated anymore. Use RecyclerView instead Horizontal Variable ListView Horizontal ListView fo

Alessandro Crugnola 862 Nov 15, 2022
A generic, customizable, open source Android ListView implementation that has 'Pull to Refresh' functionality.

Android 'Pull to Refresh' ListView library Demo video: http://www.youtube.com/watch?v=VjmdELnm3GI Project A generic, customizable, open source Android

Erik Wallentinsen 639 Nov 17, 2022
Parallax ScrollView and ListView for Android

Parallax Scrolls Parallax ListView and ScrollView for Android This project includes ScrollView with one or more parallaxed views ListView with paralla

Nir Hartmann 851 Dec 3, 2022
android custom listview,with interaction pattern load more and pull to refresh to load data dinamically

The first thing that i have to say is render thanks to johannilsson because all the part of pull to refresh listview is based in the code of his repos

Fabian Leon 447 Nov 15, 2022