ParallaxEverywhere


Source link: https://github.com/Narfss/ParallaxEverywhere

Parallax Everywhere#

Parallax everywhere (PEW) is a library with alternative android views using parallax effects.

Demo

You can try the demo app on google play.

https://play.google.com/store/apps/details?id=com.fmsirvent.ParallaxEverywhereSample

Views with effect?

Android view PEW view
ImageView PEWImageView
TextView PEWTextView

How it works?

  • Any parallax views (PEW*) needs to be inside a view with scroll events, ej: scrollView, listView, gridView....
  • Parallax effect on views will be related to its position on device screen.
  • Parallax effect in ImageView is calculated with left image in Scale mode centerCrop, centerInside or center. You can't make more parallax effect.
  • Parallax effect in no image views needs a size parallax parameter (read: Attributes)

Show me the code

Gradle dependencies:

compile 'com.fmsirvent:parallaxeverywhere:1.0.4'

Code in layout:

  <!-- add on top parent layout: xmlns:pew="http://schemas.android.com/apk/res-auto" -->

<FrameLayout

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_gravity="center"

android:layout_margin="10dp"

android:layout_weight="1">

 <com.fmsirvent.ParallaxEverywhere.PEWImageView

 android:layout_width="match_parent"

 android:layout_height="match_parent"

 android:layout_gravity="center"

 android:layout_margin="10dp"

 android:scaleType="centerCrop"

 android:src="@drawable/alicante_explanada" />

 <com.fmsirvent.ParallaxEverywhere.PEWTextView

 android:layout_width="match_parent"

 android:layout_height="match_parent"

 android:layout_margin="10dp"

 android:gravity="bottom|center_horizontal"

 android:text="@string/alicante_explanada"

 android:textColor="@android:color/white"

 pew:block_parallax_x="true"

 pew:parallax_x="160dp"

 pew:parallax_y="160dp"

 pew:reverse="reverseY" />

</FrameLayout> 

Proguard:

-dontwarn com.fmsirvent.ParallaxEverywhere.** 

Attributes

All PEW

  • reverse = ["none", "reverseX", "reverseY", "reverseBoth"] Change the direction of parallax effect. Default value "none".

  • block_parallax_x and block_parallax_y = "boolean" Blocks parallax effect. Default value false.

  • interpolation = ["linear", "accelerate_decelerate", "accelerate", "anticipate", "anticipate_overshoot", "bounce", "decelerate", "overshoot"] Animation interpolation. Default value "linear".

  • update_onDraw = = "boolean" Experimental attribute: update the parallax effect on draw event. Try if the parents don't has scroll. Now only works on +API:16 (Jelly bean). Default value false.

Only: no image PEW

  • parallax_x and parallax_y = "dimension" In non widgets images is necessary specify the size of parallax effect. The size will be split in half for each side. Default value 0.

License

ParallaxEverywhere is available under the MIT license. See the LICENSE file for more info.

Resources

It is an Android Library to customise toasts.

Generate a better rating for your Android app!

It is easy to present your users with a dialog begging for a 5-star rating, but it takes a bit more attention to do it right. This small library takes away the boiler plate and makes it easy to ask for a rating the friendly way.

PlayTabLayout is a tab layout very similar to Google Play tab layout. The main feature is that ripple shows in a particular place where user taps.

Use the LitToast to get lit and show your users a proper toast.

The Simple Number Separator is the lightweight library for separate number with coma in android or dot or dynamically by your locale device.

A sample Android application to demonstrate how to build screens as fully independent modules.

Goals

  • Use native Android SDK as much as possible (Fragment, ViewModel)
  • Support configuration changes

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