GoogleProgressBar


Source link: https://github.com/jpardogo/GoogleProgressBar

GoogleProgressBar

Android library to display different kind of google related animations for the progressBar.

The demo app can be found in the play store.

These animations have been finished so far:

TODO

  • Different colors for the already existing `GoogleMusicDicesDrawable'. Either the whole dice or his faces.

I also would love to receive your pull requests to create any of the following animations or others that you think fit on this library:

  • NEXUS_CIRCLES:

    Nexus 5 circles boot progress animation (Just the circles bouncing)

  • NEXUS_CROSS:

    Galaxy nexus shinny cross boot animation

Usage

######Dynamically Add a ProgressBar to the xml layout:

  <ProgressBar

 android:id="@+id/google_progress"

 android:layout_width="50dp"

 android:layout_height="50dp"

 android:layout_gravity="center"/>

Choose from the list of Drawables the one you want to use and place it in your code:

 @Override
  protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

ButterKnife.inject(this);

mProgressBar.setIndeterminateDrawable(new your_list_option.Builder(this)

.build());

//...
  
}

your_list_option can be replace for:

  • FoldingCirclesDrawable
  • GoogleMusicDicesDrawable
  • NexusRotationCrossDrawable
  • ChromeFloatingCircles

The more custom Drawables finished, the more options in this list.

Attributes depending on the drawable:

######Color

 mProgressBar.setIndeterminateDrawable(new you_list_option.Builder(this)

  .colors(getResources().getIntArray(R.array.colors) //Array of 4 colors

  .build());
  • FoldingCirclesDrawable
  • NexusRotationCrossDrawable
  • ChromeFloatingCirclesDrawable

So far GoogleMusicDicesDrawable doesn't have color options. The animation speed can be modified easily with android:indeterminateDuration in the xml.

If not colors are define the 4 default google colors (red,blue, yellow and green) will be used.

######From XML

When you want to use the GoogleProgresBar from XML you need to add the following view to your layout:

 <com.jpardogo.android.googleprogressbar.library.GoogleProgressBar

 android:id="@+id/google_progress"

 android:layout_width="50dp"

 android:layout_height="50dp"

 android:layout_gravity="center"

 gpb:type="your_list_option"/>

The require attribute gpb:type will specify the type of ProgressBar to display

your_list_option can be replace for:

  • folding_circles
  • nexus_rotation_cross
  • google_music_dices
  • chrome_floating_circles

The more custom Drawables finished, the more options in this list.

Each type of GoogleProgressBar have different attributes:

Attributes depending on type: ######Color

  • folding_circles
  • nexus_rotation_cross
    • gpb:colors="@array/colors"
      • Optional, If not colors are define the 4 default google colors (red,blue, yellow and green) will be used.
      • It needs to be an array of 4 colors

So far google_music_dices doesn't have color options. The animation speed can be modified easily with android:indeterminateDuration in the xml.

Including in your project

You can either add the library to your application as a library project or add the following dependency to your build.gradle:

dependencies {

  compile 'com.jpardogo.googleprogressbar:library:(latest version)' 
}

Proguard

In order to use this library with proguard you need to add this line to your proguard.cfg:

-keep class com.jpardogo.android.googleprogressbar.** {
 *; 
}
 

How to contribute?

  • Pull request to dev branch NO master.

Acknowledgements

Developed By

Javier Pardo de Santayana Gómez - [email protected]

License

Copyright 2013 Javier Pardo de Santayana Gómez  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

Simple material-style flyout menus for Android. There are many flyout type menus for Android, but this one is mine.

An ExpandableRecycleradapter with Recyclerview.

HermesEventBus is a library for using EventBus between processes, useful in IPC or plugin-in development. It has the same APIs as EventBus and easy to use.

A permission helper library that simplifies asking user for permission in Android M. With a customisable explanation dialog, you can easily explain to the user the permissions you need and why you need it, with buttons for permissions or take users to the app settings page in case the permission was denied.

A smart, novel and easy-to-use framework for Android Inter-Process Communication (IPC).

A library to edit tags like editing text in EditText.

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