StickyScrollViewItems alternatives and similar packages
Based on the "ListView/ScrollView Widget" category.
Alternatively, view StickyScrollViewItems alternatives based on common mentions on social networks and blogs.
-
Android-ObservableScrollView
Android library to observe scroll events on scrollable views. -
StickyListHeaders
An android library for section headers that stick to the top -
SwipeMenuListView
[DEPRECATED] A swipe menu for ListView. -
Pull-to-Refresh.Rentals-Android
Phoenix Pull-to-Refresh -
pinned-section-listview
Easy to use ListView with pinned sections for Android. -
android-pulltorefresh
DEPRECATED This project aims to provide a reusable pull to refresh widget for Android. -
Android-SlideExpandableListView
A better ExpandableListView, with animated expandable views for each list item -
PullZoomView
An Android custom ListView and ScrollView with pull to zoom-in. -
XListView-Android
ListView supports pull refresh and pull up to load more feature. -
Android-HorizontalListView
HorizontalListView is an Android ListView widget which scrolls in a horizontal manner (in contrast with the SDK-provided ListView which scrolls vertically). -
CommonPullToRefresh
Android widget with pull to refresh for all the views,and support loadMore for ListView , RecyclerView, GridView and SwipeRefreshLayout. -
ListBuddies
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. -
HorizontalVariableListView
Horizontal list view for Android which allows variable items widths -
PinnedHeaderListView
A ListView with pinned section headers for Android -
PullToRefresh-ListView
A generic, customizable, open source Android ListView implementation that has 'Pull to Refresh' functionality. -
StikkyHeader
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 -
ParallaxScroll
Parallax ScrollView and ListView for Android -
PagedHeadListView
Android boosted ListView supporting paginated header with a new material page indicator. -
ParallaxListView
A Android ListView Demo with a parallax effect header like Path. -
FlabbyListView
Android library to display a ListView whose cells are not rigid but flabby and react to ListView scroll. -
android-pulltorefresh-and-loadmore
android custom listview,with interaction pattern load more and pull to refresh to load data dinamically -
LinearListView
Android library that allows you to bind a LinearLayout with a ListAdapter. -
ListviewFilter
Awesome Listview filter functionality in Android. -
quickscroll
[Development stopped in 2014. Unfinished and not stable - not recommended to use.] Bringing extended scrolling features to Android's native ListView and ExpandableListView. -
FloatingGroupExpandableListView
An open source Android library that provides a floating group view at the top of the ExpandableListView -
PinterestListView
Pinterest style ListView for Android -
HeaderListView
Android ListView with sticky headers -
android-accordion-view
Simple ListView based Android AccordionView -
Android-Tiling-ScrollView
A tiling scrollview to display large picture (similar to iOS "CATiledLayer") -
DragNDropList
An easy to use Drag & Drop List for Android. Direct replacement of the android ListView. -
QuickReturn
Android ListView that implements the QuickReturn UI pattern. Written from scratch with focus on performance. -
FilterSelectorListView
FilterSelectorListView
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of StickyScrollViewItems or a related project?
README
StickyScrollViewItems
StickyScrollViewItems is a ScrollView
subclass that allowed you to mark items inside the ScrollView
as sticky
. The items marked as sticky will stick to the top of the ScrollView
until another sticky
items comes by and pushes it out of the way.
Installing
Add the following gradle dependency exchanging x.x.x for the latest release.
dependencies {
compile 'se.emilsjolander:StickyScrollViewItems:x.x.x'
}
Usage
First of all replace any instance of ScrollView
with StickyScrollView
.
So you go from this:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent" android:layout_width="match_parent">
<!-- scroll view child goes here -->
</ScrollView>
to this:
<StickyScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent" android:layout_width="match_parent"
android:id="@+id/sticky_scroll">
<!-- scroll view child goes here -->
</StickyScrollView>
As with a regular ScrollView
you are only allowed one child. But that child can contain any number of children. It is these children or any of their children that can be tagged as a sticky view. If you want t view to stick to the top when you scroll passed it add a sticky
tag with the android:tag
attribute to it like this:
<StickyScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sticky_scroll"
android:layout_height="match_parent" android:layout_width="match_parent">
<LinearLayout
android:layout_height="match_parent" android:layout_width="match_parent"
android:orientation="horizontal">
<!-- other children -->
<View
android:layout_height="300dp"
android:layout_width="match_parent"
android:tag="sticky"/>
<!-- other children -->
</LinearLayout>
</StickyScrollView>
There are also two additional flags that can be set on views that were added to optimize performance for the most usual cases. If the view you want to stick either has transparency or does not have a constant representation than you must supply one or both of the following flags. -hastransparancy
for views that have transparancy and -nonconstant
for views that will change appearance during there sticky time (examples are buttons with pressed states as well as progress spinners).
So this ends up with 4 different ways to tag a view as sticky resulting is slightly different behaviour android:tag="sticky"
android:tag="sticky-hastransparancy"
android:tag="sticky-nonconstant"
and android:tag="sticky-hastransparancy-nonconstant"
.
If you want to add a shadow drawable below the stuck items, you must declare a namespace to find the shadow attributes xmlns:whatever="http://schemas.android.com/apk/res-auto"
. Usually you do this in the root layout element in you layout.xml file. You can then specify the shadow drawable with whatever:stuckShadowDrawable=""
and the shadow height with whatever:stuckShadowHeight=""
in xml. Note that when left unspecified, the default shadow height is 10dip.
<StickyScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:whatever="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent" android:layout_width="match_parent"
android:id="@+id/sticky_scroll"
whatever:stuckShadowDrawable="@drawable/sticky_shadow_default"
whatever:stuckShadowHeight="50dip" >
<!-- scroll view child goes here -->
</StickyScrollView>
These shadow height and drawable can also be set programatically. Note that, unlike the xml attribute, setShadowHeight(pixels)
only takes the values in pixels.
StickyScrollView stickyScroll = (StickyScrollView) findViewById(R.id.sticky_scroll);
stickyScroll.setShadowDrawable(getResources().getDrawable(
R.drawable.shadow_drawable));
stickyScroll.setShadowHeight(50); // in pixels