Coder Social home page Coder Social logo

android-scrollbarpanel's Introduction

Path 2.0 like ScrollBarPanel for Android

Screenshot

Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0.

Features

  • Supports custom View as ScrollBarPanel.

Repository at https://github.com/rno/Android-ScrollBarPanel.

Usage

Layout

<!--
  The ExtendedListView replaces a standard ListView widget
  and provides the ScrollBarPanel capability.
-->
<com.dafruits.android.library.widgets.ExtendedListView
    xmlns:dafruits="http://schemas.android.com/apk/res/YOUR_APP_PACKAGE_NAME"
    android:id="@android:id/list"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    dafruits:scrollBarPanel="@layout/YOUR_SCROLLBARPANEL_LAYOUT"
    dafruits:scrollBarPanelInAnimation="@anim/YOUR_ANIMATION"
    dafruits:scrollBarPanelOutAnimation="@anim/YOUR_ANIMATION" />

Activity

// Set your scrollBarPanel
ExtendedListView listView = (ExtendedListView) findViewById(android.R.id.list);

// Attach a position changed listener on the listview and play with your scrollBarPanel
// when you need to update its content
mListView.setOnPositionChangedListener(new OnPositionChangedListener() {

	@Override
	public void onPositionChanged(ExtendedListView listView, int firstVisiblePosition, View scrollBarPanel) {
		((TextView) scrollBarPanel).setText("Position " + firstVisiblePosition);
	}
});

Pull Requests

I will gladly accept pull requests for fixes and feature enhancements but please do them in the dev branch. The master branch is for the latest stable code, dev is where I try things out before releasing them as stable. Any pull requests that are against master from now on will be closed asking for you to do another pull against dev.

Changelog

0.1.0

  • first commit :-)

0.1.1

  • added scrollBarPanel attribute to ExtendedListView

0.1.2

  • Optimisations

0.1.3

  • More precision regarding scrollBarPanel fade in and fade out (Thanks Cyril Mottier for the tip!)

0.1.4

  • Use the position the scrollbar thumb is on instead of the firstVisibleItem position.

0.1.5

  • Fix NPE (Thanks to Chris Banes)
  • Added attributes to ExtendedListView to customize in / out animation of scrollBarPanel

Acknowledgments

License

Licensed under the Apache License, Version 2.0

android-scrollbarpanel's People

Contributors

rno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-scrollbarpanel's Issues

not work for fast scroll

benam khoda
hi,
i enabled fast scroll for my listview , but this library hide when scrolling :(
lst.setFastScrollEnabled(true);

Explain better the role of this widget

I am sure that this is a very nice widget. However, at the moment, your sole description is that it is "like Path", which will only make sense to people who use that app. Not everybody uses Path. For example, I do not use Path. Hence, I have no idea what your widget does that is not already handled by SectionIndexer in the SDK.

IMHO, adding a few sentences to the README explaining the widget's behavior and its use cases will make it easier for developers to determine whether or not your widget meets their particular needs.

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.