Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including cordova-android-scrollbar with all npm packages installed. Try it out:

cordova-android-scrollbar lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("cordova-android-scrollbar/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

cordova-android-scrollbar v0.2.1

Control the vertical scrollbar on Android.

What is it?

Cordova disables vertical scrollbars on android. This plugin provides you with a way to programatically reenable them.

How to use it?


Install the plugin into your cordova project via

cordova plugin add cordova-android-scrollbar

After installing the plugin, the API is exposed on the global mayflower.AndroidScrollbar object.


The plugin exposes two methods for querying and changing the visiblity of the vertical scrollbar. All methods return Promises/A+ compliant promises.

Important: This plugin was written for reenabling the scrollbar on Android, so the methods below are just stubs on all other platforms!

Querying scrollbar visibility

        function(visiblity) {
            console.log('Vertical scrollbar is ' + (visibility ? 'visible' : 'hidden'));
        function(error) {
            console.log('error', error);

Changing scrollbar visibility

        function() {
            console.log('Vertical scrollbar enabled');
        function(error) {
            console.log('error', error);

Test / Usage sample

There is a small usage sample in test/index.html. In order to use it, you'll have to create a cordova project, add the plugin and configure test/index.html as your entrypoint. The resulting app will show you a long webpage with a button for controlling the scrollbar at the top.


If you want to hack on the plugin, you'll have to rebuild the Javascript bridge from the TypeScript sources.

npm install

Obviously, this will only work if you install NodeJS / io.js and grunt-cli first.


The plugin is published under the Apache license v2.0 .

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free