Code Monkey home page Code Monkey logo

gearloadingproject's Introduction

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)

gearloadingproject's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.