GearLoadingLayout
Description
GearLoadingLayout widget for android that can be used as a progress bar, snack bar or yourself to create your own arrangements for their needs.
Short Description
-
Use one of the three prepared layouts (One Gear, Two Gears, Three Gears)
-
Use GearDialogBuilder to create you loading dialog, with lot functionality
GearView
Samples
In Xml
In Code
GearView gearView = new GearView(mContext);
gearView.setMainDiameter(300);
gearView.setSecondDiameter(240);
gearView.setInnerDiameter(80);
gearView.setTeethWidth(40);
gearView.setRotateOffset(20);
gearView.setColor(Color.BLUE);
gearView.setInnerColor(Color.RED);
gearView.enableCuttedCenter(true); // boolean param == true (center of GearView will be cutted)
gearView.startSpinning(false); // start spinning animation, boolean param == true (rotate to the left side) | param == false (rotate to the right side)
(and don`t forget add to your root view)
On Android Device
Cutted Center | Filled Center
:-------------------------:|:-------------------------: |
GearLayout
Features
- Already preset layout
- Small feature as CutOut Layout
- Flexible functionality
Samples
In Xml
-
Three Gears
-
Two Gears
-
One Gear
In Code
-
One Gear
OneGearLayout threeGearsLayout = new OneGearLayout(this); threeGearsLayout.setFirstGearColor(Color.WHITE); threeGearsLayout.setDialogBackgroundColor(Color.GREEN); threeGearsLayout.setDialogBackgroundAlpha(0.3f); threeGearsLayout.blurBackground(true); threeGearsLayout.enableCutLayout(false); threeGearsLayout.setCutRadius(80); threeGearsLayout.start();
-
Two Gears
TwoGearsLayout threeGearsLayout = new TwoGearsLayout(this); threeGearsLayout.setFirstGearColor(Color.WHITE); threeGearsLayout.setSecondGearColor(Color.RED); threeGearsLayout.setDialogBackgroundColor(Color.GREEN); threeGearsLayout.setDialogBackgroundAlpha(0.3f); threeGearsLayout.blurBackground(true); threeGearsLayout.enableCutLayout(false); threeGearsLayout.setCutRadius(80); threeGearsLayout.start();
-
Three Gears
ThreeGearsLayout threeGearsLayout = new ThreeGearsLayout(this); threeGearsLayout.setFirstGearColor(Color.WHITE); threeGearsLayout.setSecondGearColor(Color.RED); threeGearsLayout.setThirdGearColor(Color.CYAN); threeGearsLayout.setDialogBackgroundColor(Color.GREEN); threeGearsLayout.setDialogBackgroundAlpha(0.3f); threeGearsLayout.blurBackground(true); threeGearsLayout.enableCutLayout(false); threeGearsLayout.setCutRadius(80); threeGearsLayout.start();
On Android Device
|With CutLayout | One Gear | Two Gears | Three Gears | :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: |
|
|
GearDialogBuilder
Features
- Fast create loading dialog
- Enable Blur Effect (Thanks This Stack Overflow Resource)
- Support modes : Dialog, Snackbar
Sample
GearDialogBuilder.getInstance(MainActivity.this)
.setType(ThreeGearsLayout.class)
.setShowDialogDuration(200)
.setShowMode(showMode)
.setDuration(3000)
.blurBackground(blur)
.enableCutLayout(false)
.setDialogBackgroundAlpha(0.5f)
.setDialogBackgroundColor(mResources.getColor(R.color.colorAccent))
.setFirstGearColor(mResources.getColor(R.color.colorPrimaryDark))
.setSecondGearColor(mResources.getColor(R.color.dialog_stroke_color))
.setThirdGearColor(mResources.getColor(R.color.colorPrimary))
.show();
On Android Device
Android SDK Version
Min SDK Version == 11.
License
Apache 2.0. See LICENSE file for details.
Author
Liubomyr Miller (lj-3d)