FlabbyListView


Source link: https://github.com/jpardogo/FlabbyListView

FlabbyListView

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.
The demo app can be found on the play store.
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:

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]

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. 

Resources

You can use it to quickly turn a String into a Spannable and apply different types of spans to it.

new Makeup( name + ", " + age).boldify(0, name.length()).apply()

This would show a name and age of a person, and make the name part bold.

Battery Historian is a tool to analyze battery consumers using Android "bugreport" files.

A Java library for the Forecast.io API. It is quite functional at this point. The API is fully implemented except for callbacks. Further development will continue. A jar file with the dependencies is available under the jar/ folder for convenience.

Fontain is a lightweight library for displaying text in custom fonts in your Android applications

Fontain allows you to include a number of custom fonts within your app, and then access them by their Font Family, Weight, Width and Slope. It simplifies the process of selecting the proper typeface for any given usage.

EtsyBlur is an Android library that allows developers to easily add a glass-like effect.

ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like the Google Play's app description.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes