GearLoadingProject


Source link: https://github.com/lj-3d/GearLoadingProject

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

GearView


Samples

In Xml

<lj_3d.gearloadinglayout.gearViews.GearView

android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  gear:mainDiameter="150dp"
  gear:secondDiameter="120dp"
  gear:innerDiameter="30dp"
  gear:enableCutCenter="true"
  gear:teethWidth="20dp"
  gear:mainColor="#3F51B5"
  gear:innerColor="#FF4081"
  gear:rotateAngle="10"/>

  

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

    
    
    <lj_3d.gearloadinglayout.gearViews.ThreeGearsLayout
    
    android:layout_width="match_parent"
    
    android:layout_height="match_parent"
    
    gear:layoutAlpha="0.5"
    
    gear:gearLayoutCutAlpha="0.5"
    
    gear:cutLayoutVisibility="true"
    
    gear:firstGearColor="@color/colorAccent"
    
    gear:secondGearColor="@color/colorAccent"
    
    gear:thirdGearColor="@color/colorAccent"
    
    gear:firstGearCuttedCenter="false"
    
    gear:secondGearCuttedCenter="false"
    
    gear:thirdGearCuttedCenter="false"
    
    gear:gearLayoutCutColor="@color/colorPrimaryDark"
    
    gear:gearLayoutCutRadius="40dp"
    
    gear:firstInnerGearColor="@color/colorPrimary"
    
    gear:secondInnerGearColor="@color/colorPrimary"
    
    gear:thirdInnerGearColor="@color/colorPrimary"/>
    
  • Two Gears

    
    
     <lj_3d.gearloadinglayout.gearViews.TwoGearsLayout
    
     android:layout_width="match_parent"
    
     android:layout_height="match_parent"
    
     gear:layoutAlpha="0.5"
    
     gear:gearLayoutCutAlpha="0.5"
    
     gear:cutLayoutVisibility="true"
    
     gear:firstGearColor="@color/colorAccent"
    
     gear:secondGearColor="@color/colorAccent"
    
     gear:firstGearCuttedCenter="false"
    
     gear:secondGearCuttedCenter="false"
    
     gear:gearLayoutCutColor="@color/colorPrimaryDark"
    
     gear:gearLayoutCutRadius="40dp"
    
     gear:firstInnerGearColor="@color/colorPrimary"
    
     gear:secondInnerGearColor="@color/colorPrimary"/> 
  • One Gear

    
    
     <lj_3d.gearloadinglayout.gearViews.OneGearLayout
    
     android:layout_width="match_parent"
    
     android:layout_height="match_parent"
    
     gear:layoutAlpha="0.5"
    
     gear:gearLayoutCutAlpha="0.5"
    
     gear:cutLayoutVisibility="true"
    
     gear:firstGearColor="@color/colorAccent"
    
     gear:firstGearCuttedCenter="false"
    
     gear:gearLayoutCutColor="@color/colorPrimaryDark"
    
     gear:gearLayoutCutRadius="40dp"
    
     gear:firstInnerGearColor="@color/colorPrimary"/>
    
      

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

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)

Resources

android-utils contains a lot of useful utility classes for Android development.

Character picker view.

A simple, yet powerful wrapper around the SupportMapFragment with support for clustering and built-in support for querying and rendering a Realm results.

A simple and powerful EditText and RecyclerView UI component. It's build on top of RealmRecyclerView and RealmBasedRecyclerViewAdapter.

Aligned is a tiny library for Android that makes putting text on baseline infinitely easier.

CleverRecyclerView is based on RecyclerView and provides a similar to ViewPager sliding effect.

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