Giter Club home page Giter Club logo

retractive-scroll-views-for-android's Introduction

日本語

Retractive Scroll Views for Android

This is a library for Android. This is a retractable HorizontalScrollView. You can also sync scrolling in HorizontalScrollViews. It supports Android 1.6 (API Level4) or later.

RetractiveHorizontalScrollView extends android.widget.HorizontalScrollView. In the future, I might add RetractiveVerticalScrollView extends android.widget.ScrollView, if you want it.

Sample movies

Scrolling a retractive scroll view

Sync three scroll views

Download

ver.0.1

How to use

How to retract a view

Create layout like this. And use RetractiveHorizontalScrollView as android.widget.HorizontalScrollView. Complete example is here.

<nu.mine.tmyymmt.android.widget.RetractiveHorizontalScrollView>
  <LinearLayout>
    <TextView/> <!-- left side -->
    <TextView/> <!-- main content -->
    <TextView/> <!-- right side -->
  </LinearLayout>
</nu.mine.tmyymmt.android.widget.RetractiveHorizontalScrollView>

How to sync some RetractiveHorizontalScrollViews

Add some RetractiveHorizontalScrollViews which you want to sync to another view by RetractiveHorizontalScrollView#addSyncScrollView(RetractiveHorizontalScrollView syncScrollView). Complete example is here.

RetractiveHorizontalScrollView scrollView1 = (RetractiveHorizontalScrollView) findViewById(R.id.scroll_view);
RetractiveHorizontalScrollView scrollView2 = (RetractiveHorizontalScrollView) findViewById(R.id.scroll_view2);
RetractiveHorizontalScrollView scrollView3 = (RetractiveHorizontalScrollView) findViewById(R.id.scroll_view3);

// add scroll views which you want to sync with scrollView1.
scrollView1.addSyncScrollView(scrollView2);
scrollView1.addSyncScrollView(scrollView3);

// add scroll views which you want to sync with scrollView2.
scrollView2.addSyncScrollView(scrollView1);
scrollView2.addSyncScrollView(scrollView3);

// add scroll views which you want to sync with scrollView3.
scrollView3.addSyncScrollView(scrollView1);
scrollView3.addSyncScrollView(scrollView2);

Code Examples

These are the same as movies.

Retractive-Scroll-Views-for-Android_example is here.

Retractive-Scroll-Views-for-Android_example_sync is here.

Javadoc

Please see detail at javadoc.

License

Copyright © 2012 Tomoya Yamamoto 山本智世 profile_image

Distributed under the MIT License.

Contact

Tomoya Yamamoto 山本智世 profile_image ([email protected])

Reference Information

You can see good ideas for about this kind of thing in Japanese.

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.