Swipper


Source link: https://github.com/pkarira/swipper

Swipper

Android Library for custom views to control brightness , volume and seek through swipable gestures . These views could easily replace the conventional volume / brightness / seek controls that we have in music player ,video player or gallery apps .

                                                    

Dependency

Add dependency to build.gradle of your app ```java dependencies { compile 'com.swipper.library:library:0.1.1' } ```

Usage

Extend the activity in which you want to implement by Swipper instead of Activity / AppCompatActivity like:

public class MainActivity extends Swipper{

}

Pass the context of your activity in set(context) method in onCreate() of your activity like :

set(this)

Now select swipe options for Brightness/Volume/SeekTo functions , to do this call Brightness() , Volume() , Seek() methods with orientation as parameter in onCreate() of your activity , suppose you want brightness on vertical swipe then do this:

Brightness(Orientation.VERTICAL)

Orientation can also be set to HORIZONTAL for working on horizontal swipe or to CIRCULAR for circular seek bar . Similarily do this for volume too .

Volume(Orientation.CIRCULAR)

Circular custom view appears on double tapping the screen

In seek method you need to pass your VideoView / Mediaplayer object along with orientation parameter , like:

 MediaPlayer mediaPlayer=.....  Seek(Orientation.HORIZONTAL,mediaPlayer)

Orientations

Orientation Description
Orientation.VERTICAL Associates Brightness/Volume/Seek option on vertical gesture i.e up and down swipe
Orientation.HORIZONTAL Associates Brightness/Volume/Seek option on horizontal gesture i.e left and right swipe
Orientation.CIRCULAR Associates Brightness or Volume option on circular seek bar

Other Methods

Method Role
setColor(String color) pass hex color to change color of custom view which is by default a shade of orange
disableBrightness() to stop working of view associated with brightness
disableSeek() to stop working of view associated with Seek
disableVolume() to stop working of view associated with Volume
enableBrightness() to again start the working of view associated with Brightness
enableSeek() to again start the working of view associated with Seek
enableVolume() to again start the working of view associated with Volume

Library is completely exclusive and no external library has been used in making it

License

Copyright 2016 Pulkit Karira  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

Utility class to make GoogleMap with custom theme.

DevBricks provides several classes which will be usually used in daily Android development. With these "bricks", your development will become:

  • Efficient : The classes provided by DevBricks almost cover all of the aspect in daily development, from low-end database to user interface. You do not need to waste your time on those repeating work.
  • Reliable : More than 60% code has related Unit test. Your work will stand on stable foundation.
  • Consistent : DevBricks includes unified logging system, database accessing, UI elements and styles. This make all of your applications has consistency at primary impression.

A menu which can ... BOOM!

An Android button which can animate into a circular progress-bar when user clicks on it. The behaviour of this progress-bar can be either indeterminate, fixed time progressing or user can manually manage the progress.

This library allows to use Material activity choosers on Jelly Bean+.

Clog is logger implementation for the standard Android Log.

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