Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 1.53 KB

README.md

File metadata and controls

71 lines (55 loc) · 1.53 KB

android-utility

Useful utility classes for android.

  1. Animation
  2. Local Storage

Animation Helper

## With this helper, you can assign any type of animation to your element ( such as each listview, gridview and etc. )

How to use?

Note: In the following example codes, first parameter is speed and second is offset ( delay time ).

Scale

gridView.setLayoutAnimation( Animation.Scale( 300, 200 ) );

Fade In

gridView.setLayoutAnimation( Animation.FadeIn( 800, 0 ) );

Fade Out

gridView.setLayoutAnimation( Animation.FadeOut( 800, 0 ) );

Slide Up

listView.setLayoutAnimation( Animation.SlideUp( 250, 0 ) );

Slide Down

listView.setLayoutAnimation( Animation.SlideDown( 250, 0 ) );

Push Right

listView.setLayoutAnimation( Animation.PushRight( 250, 0 ) );

Push Left

listView.setLayoutAnimation( Animation.PushLeft( 250, 0 ) );

Bounce image from up to down

Animation.BounceImage( imageView, 1600 );

Local Storage Helper

With this helper, you can put or get data on in-app local storage.

Example

LocalStorage Local = new LocalStorage( this );

// For putting data in storage
Local.putString( "user-email", "example@gmail.com" );
Local.putInt( "userid", 5 );
Local.putBoolean( "is-login", true );

// For getting data of storage
Local.getString( "user-email" );
Local.getInt( "userid" );
Local.getBoolean( "is-login" );