DecentBanner


Source link: https://github.com/chengdazhi/DecentBanner

DecentBanner

To try out the sample, download the apk from chengdazhi.com/decentbanner or scan the following QR code:

Features

  • Smooth buoy movement animation and title opacity animation.

  • You can choose to enable logo at the top left corner.

  • Compatible to banners with less than three items.

  • You can specify the auto scroll interval and animation duration.

  • public methods to start and stop auto scroll.

  • Infinite loop.

Import

Maven

<dependency>
<groupId>it.chengdazhi.decentbanner</groupId>
<artifactId>decentbanner</artifactId>
<version>1.0.7</version>
<type>pom</type> </dependency> 

Gradle

dependencies {

  compile 'it.chengdazhi.decentbanner:decentbanner:1.0.7' 
}
 

Usage

  • To initiate your DecentBanner, first acquire DecentBanner instance mDecentBanner in Java or XML, then:
/** * @param views the list of views that you want to include in the banner * @param titles the list of titles that appears as tabs at the bottom * @param intervalSeconds the interval of auto scrolling, set to 2 in sample * @param animationMillis the scrolling's animation time, set to 500 in sample * @param int logoResourceId | Bitmap logoBitmap the logo you want to display. 

  You can skip this param if you don't want it. */ mDecentBanner.start(List<View> views, List<String> titles, int intervalSeconds,

int animationMillis[, int logoResourceId | Bitmap logoBitmap]);
  • Note that when you want to show less than 3 views, you need to extend the views to be no less than three items. When you want to display 2 views, your titles param should contain 2 items and your views param should contain 4 items as ABAB

  • You can call the following two methods to start/stop auto scrolling.

mDecentBanner.startAutoPlay();
 mDecentBanner.stopAutoPlay();
  • You can call these method to enable/disable gradient cover or to query whether the cover is enabled
mDecentBanner.setGradientEnabled(boolean enabled);
 mDecentBanner.isGradientEnabled();

License

Copyright 2016 chengdazhi  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

A library which can get phone number geo location and other information from local or network (baidu, juhe or custom api).

Detects gestures on Android with listener and RxJava Observable.

AndRouter is a android framework used to map url to activities or actions.

APT processor to generate update methods for POJOs.

This project aims to provide pretty cool equalizer for any Android audio project.

This is the real android video player view with fullscreen function.

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