Android library to display a ListView whose cells are not rigid but flabby and react to ListView scroll.

Overview

FlabbyListView

This library is not maintained anymore and there will be no further releases

Android library to display a ListView which cells are not rigid but flabby and react to ListView scroll and touch events.

A video example of this library is on this youtube video.
And I also wrote a blog post about this library in my blog

Usage

1.Place the FlabbyListView on your layout:

    <com.jpardogo.android.flabbylistview.lib.FlabbyListView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

2.Populate it with items which xml layout is wrap by a FlabbyLayout:

    <!--Notice that this view extends from <FrameLayout/>.-->
    <com.jpardogo.android.flabbylistview.lib.FlabbyLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/apk/tools"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:orientation="vertical">

        <!--Your content-->

    </FlabbyLayout>

3.Set the color of each item. It needs to be set on the getView method of your adapter calling setFlabbyColor from FlabbyLayout:

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = LayoutInflater.from(mContext).inflate(R.layout.item_list, parent, false);
            holder = new ViewHolder(convertView);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        int color = Color.argb(255, mRandomizer.nextInt(256), mRandomizer.nextInt(256), mRandomizer.nextInt(256));
        ((FlabbyLayout)convertView).setFlabbyColor(color);
        holder.text.setText(getItem(position));
        return convertView;
    }

Including in your project

You can either add the library to your application as a library project or add the following dependency to your build.gradle:

Maven Central

dependencies {
    compile 'com.jpardogo.flabbylistview:library:(latest version)'
}

Notes

The iOS version developed by brocoo is available at BRFlabbyTable

Developed By

Javier Pardo de Santayana Gómez - [email protected]

Follow me on Twitter Follow me on Google+ Follow me on LinkedIn

License

Copyright 2013 Javier Pardo de Santayana Gómez

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.
You might also like...
. Android library that integrate sticky section headers in your RecyclerView

recyclerview-stickyheaders Recyclerview-stickyheaders is an Android library that makes it easy to integrate section headers in your RecyclerView. Thes

An android library for section headers that stick to the top
An android library for section headers that stick to the top

StickyListHeaders StickyListHeaders is an Android library that makes it easy to integrate section headers in your ListView. These section headers stic

An Android Animation library which easily add itemanimator to RecyclerView items.
An Android Animation library which easily add itemanimator to RecyclerView items.

RecyclerView Animators RecyclerView Animators is an Android library that allows developers to easily create RecyclerView with animations. Please feel

Android library providing simple way to control divider items (ItemDecoration) of RecyclerView
Android library providing simple way to control divider items (ItemDecoration) of RecyclerView

RecyclerView-FlexibleDivider Android library providing simple way to control divider items of RecyclerView Release Note [Release Note] (https://github

Android library defining adapter classes of RecyclerView to manage multiple view types
Android library defining adapter classes of RecyclerView to manage multiple view types

RecyclerView-MultipleViewTypeAdapter RecyclerView adapter classes for managing multiple view types Release Note [Release Note] (https://github.com/yqr

Dividers is a simple Android library to create easy separators for your RecyclerViews
Dividers is a simple Android library to create easy separators for your RecyclerViews

Dividers Dividers is an Android library to easily create separators for your RecyclerViews. It supports a wide range of dividers from simple ones, tha

A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.

StaggeredGridView Introduction This is a modified version of Android's experimental StaggeredGridView. The StaggeredGridView allows the user to create

Drag and drop GridView for Android
Drag and drop GridView for Android

DynamicGrid Drag and drop GridView for Android. Depricated It's much better to use solutions based on recycler view. For example https://github.com/h6

A drag-and-drop scrolling grid view for Android

DraggableGridView¶ ↑ a drag-and-drop scrolling grid view for Android Including in your project¶ ↑ To start using DraggableGridView: Place libs/Draggab

Comments
  •  Main manifest has <uses-sdk android:minSdkVersion='8'> but library uses minSdkVersion='10'

    Main manifest has but library uses minSdkVersion='10'

    I want to reference the library in my project(https://github.com/snowdream/android-widgets).i get the error as follows.
    It seems that the minSdkVersion of my project is 8, but your minSdkVersion is 10.
    If your library is avaiable for minSdkVersion 8, can you modify it to minSdkVersion 8,thank you.

    [/home/snowdream/workspace/git/android-widgets/lib/src/main/AndroidManifest.xml, /home/snowdream/workspace/git/android-widgets/lib/build/exploded-aar/com.jpardogo.flabbylistview/library/1.0.0/AndroidManifest.xml:2]   
     Main manifest has <uses-sdk android:minSdkVersion='8'> but library uses minSdkVersion='10'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    
    opened by snowdream 1
  • Invalid Region.Op - only INTERSECT and DIFFERENCE

    Invalid Region.Op - only INTERSECT and DIFFERENCE

    I use it in android 9.0. something happened Process: com.aiocw.termsinnocent, PID: 5980 java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed at android.graphics.Canvas.checkValidClipOp(Canvas.java:789) at android.graphics.Canvas.clipRect(Canvas.java:836) at com.jpardogo.android.flabbylistview.lib.FlabbyLayout.onDraw(FlabbyLayout.java:59) at android.view.View.draw(View.java:20226) at android.view.View.updateDisplayListIfDirty(View.java:19101) at android.view.View.draw(View.java:19954)

    about this erro. FlabbyLayout.java @Override protected void onDraw(final Canvas canvas) { if (mWidth == 0) mWidth = getWidth(); if (mHeight == 0) mHeight = getHeight(); mRect = canvas.getClipBounds(); mRect.inset(0, -mHeight / 2); canvas.clipRect(mRect, Region.Op.REPLACE); float startX1;

    use this if(Build.VERSION.SDK_INT >= 28){ canvas.clipPath(mPath0); }else { canvas.clipPath(mPath0, Region.Op.XOR); } to replace

    could you fix this problem?

    opened by Yaque 0
  • FlabbyLayout background color changes after loading images.

    FlabbyLayout background color changes after loading images.

    Hi I am loading images in this FlabbyListView using UIL library. I want to set background color of listview items like you are doing(but I want to change alternate color only). Problem is that color loads as image gets loaded. Please how can we add background color of listitems before loading image.

    Thanks

    opened by 19rs39 0
Owner
JPARDOGO
Android language writer and translator. Twitter: @jpardogo
JPARDOGO
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 29, 2022
An Android GridView that can be configured to scroll horizontally or vertically

TwoWayGridView An Android GridView that can be configured to scroll horizontally or vertically. I should have posted this over a year and a half ago,

Jess Anders 656 Jan 9, 2023
Scroll + discover = DiscrollView

Discrollview Regularly, I am pleasantly surprised by websites using a pattern I called the discrollver pattern. I'm sure you already know what I'm tal

Flavien Laurent 1.5k Dec 29, 2022
Kotlin way of building RecyclerView Adapter 🧩. You do not have to write RecyclerView Adapters again and again and suffer from handling of different view types. Kiel will help you.

Kiel Kiel is a RecyclerView.Adapter with a minimalistic and convenient Kotlin DSL which provides utility on top of Android's normal RecyclerView.Adapt

ibrahim yilmaz 370 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
Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span

AsymmetricGridView An Android custom ListView that implements multiple columns and variable sized elements. Please note that this is currently in a pr

Felipe Lima 1.8k Jan 7, 2023
[] A swipe menu for ListView.

SwipeMenuListView A swipe menu for ListView. Demo Usage Add dependency dependencies { compile 'com.baoyz.swipemenulistview:library:1.3.0' } Step 1

星一 3.5k Dec 16, 2022
ListView with blur/parallax/sticky capabilities

BlurStickyHeaderListView What is BlurStickyHeaderListView? It is a custom ListView with a header that displays pictures from an URL. It then adds a ni

null 129 Oct 26, 2022
*** WARNING: This library is no longer maintained *** An easy way to add a simple 'swipe-and-do-something' behavior to your `RecyclerView` items. Just like in Gmail or Inbox apps.

SwipeToAction An easy way to add a simple 'swipe-and-do-something' behavior to your RecyclerView items. Just like in Gmail or Inbox apps. Integration

Victor Calvello 223 Nov 16, 2022
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Haruki Hasegawa 5.2k Dec 23, 2022