ParallaxPager alternatives and similar packages
Based on the "Other Widget" category.
Alternatively, view ParallaxPager alternatives based on common mentions on social networks and blogs.
-
AndroidSlidingUpPanel
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano. -
BottomBar
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern. -
ShortcutBadger
An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers. -
SystemBarTint
[DEPRECATED] Apply background tinting to the Android system UI when using KitKat translucent modes -
TapTargetView
An implementation of tap targets from the Material Design guidelines for feature discovery. -
android-viewbadger
[DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout -
android-stackblur
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann. -
android-iconify
Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,... -
DraggablePanel
DISCONTINUED. Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component. -
aFileChooser
DISCONTINUED. [DEPRECATED] Android library that provides a file explorer to let users select files on external storage. -
Swipecards
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content. -
TourGuide
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View -
StickyGridHeaders
DISCONTINUED. An Android Library that makes it easy to make grid views with sectioned data and headers that stick to the top. -
FloatingView
FloatingView can make the target view floating above the anchor view with cool animation -
TileView
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing. -
Bubbles for Android
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development. -
RippleView
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+) -
Android-ActionItemBadge
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem -
android-sliding-layer-lib
DISCONTINUED. Highly customizable SlidingLayer as you have seen in Wunderlist -
SortableTableView
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs. -
ScratchView
ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. -
android-FlipView
A small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ParallaxPager or a related project?
README
Parallax Pager
Add some depth to your Android scrolling using the parallax effect!
Installation
Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.prolificinteractive:parallaxpager:${parallaxpagerVersion}'
}
Usage
There are 4 important steps:
Use a
ParallaxContainer
in layout XMLCreate a layout XML file for each page
Wrap the Activity Context
Add the attachment code to
onCreate
of your Activity oronCreateView
of your Fragment
1. Use a ParallaxContainer
in layout XML
Use the class com.prolificinteractive.parallaxpager.ParallaxContainer
in your layout XML, sizing it however you like.
Ex:
<com.prolificinteractive.parallaxpager.ParallaxContainer
android:id="@+id/parallax_container_1"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
2. Create a layout XML file for each page
Each page must have its own layout XML file. Use whichever Layouts or Views you like, as usual.
Ensure this line is added to the Root Element:
xmlns:app="http://schemas.android.com/apk/res-auto"
Assign any combination of the following attributes (all floats):
x_in
: as the View enters the screen, it will translate in the horizontal direction along with user swiping, at a rate multiplied by this value. Default is0
.x_out
: as the View leaves the screen, it will translate in the horizontal direction along with user swiping, at a rate multiplied by this value. Default is0
.y_in
: as the View enters the screen, it will translate downward as the user swipes right to left, at a rate multiplied by this value. Default is0
.y_out
: as the View leaves the screen, it will translate upward as the user swipes right to left, at a rate multiplied by this value. Default is0
.a_in
: as the View enters the screen, it will fade in as the user swipes right to left, at a rate multiplied by this value. Default is0
.a_out
: as the View leaves the screen, it will fade out as the user swipes right to left, at a rate multiplied by this value. Default is0
.
Ex:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:x_in="@dimen/parallax_speed_medium"
app:x_out="@dimen/parallax_speed_fast"
app:y_in="@dimen/parallax_speed_medium_rev"
app:y_out="@dimen/parallax_speed_fast"
app:a_in="@dimen/parallax_speed_very_fast"
app:a_out="@dimen/parallax_speed_very_fast"
android:text="@string/text_1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:x_in="@dimen/parallax_speed_medium_rev"
app:x_out="@dimen/parallax_speed_fast"
app:y_in="@dimen/parallax_speed_medium"
app:y_out="@dimen/parallax_speed_fast_rev"
app:a_in="@dimen/parallax_speed_very_fast"
app:a_out="@dimen/parallax_speed_very_fast"
android:text="@string/text_2"
/>
</LinearLayout>
Keep in mind that negative values mean a change in direction for translation effects, and have no effect for alpha. For translation effects, values between 0
and 1
will result in a high level of funkiness.
3. Wrap the Activity Context
Wrap the activity context using com.prolificinteractive.parallaxpager.ParallaxContextWrapper
in your activity.
Ex:
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(new ParallaxContextWrapper(newBase));
}
Note: If you are using this in conjunction with another library that wraps Context, it doesn't appear to like chaining them together. Instead, we've added the ability to hook into the View creation process to use with other libraries. The sample project shows how to hook into Calligraphy.
Ex:
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(
new ParallaxContextWrapper(newBase, new OnViewCreatedListener() {
@Override public View onViewCreated(View view, Context context, AttributeSet attrs) {
//Setup view as needed
return view; //Return the view passed in
}
})
);
}
4. Add the attachment code to onCreate
of your Activity or onCreateView
of your Fragment
Important steps in onCreate
of an Activity (or onCreateView
of a Fragment):
Find the parallax container by ID
Specify whether the pager should loop (
true
means it will loop)Submit a Layout Inflater and list the layouts for each page (in order). Currently there must be at least 2 in this list (repeats allowed).
Ex:
// find the parallax container
ParallaxContainer parallaxContainer = (ParallaxContainer) findViewById(R.id.parallax_container);
// specify whether pager will loop
parallaxContainer.setLooping(true);
// wrap the inflater and inflate children with custom attributes
parallaxContainer.setupChildren(getLayoutInflater(),
R.layout.parallax_view_1,
R.layout.parallax_view_2,
R.layout.parallax_view_3,
R.layout.parallax_view_4);
Extras
Extra 1. Setting a ViewPager.OnPageChangeListener
You can set a ViewPager.OnPageChangeListener
after the attachment code in step 4.
// optionally set a ViewPager.OnPageChangeListener
parallaxContainer.setOnPageChangeListener(this);
Extra 2. ViewPager
access
You have access to the ViewPager
by calling:
parallaxContainer.getViewPager();
This is exposed for use with existing code which requires a ViewPager
instance. Please make sure that if you call methods like setAdapter
or setOnPageChangeListener
on the instance returned, that you do so with forethought and good reason.
Extra 3. Overriding parallax visibility
Parallax views will be VISIBLE
when onscreen, and GONE
when offscreen. If you need to override this behavior, set this attribute on your View in XML:
app:override_visibility="true"
Contributing
To report a bug or enhancement request, feel free to file an issue under the respective heading. If you wish to contribute to the project, fork this repo and submit a pull request.
Code contributions should follow the standards specified in the Prolific Android Code Style.
License
Copyright (c) 2018 Prolific Interactive
Parallax Pager is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the [LICENSE] file.
*Note that all licence references and agreements mentioned in the ParallaxPager README section above
are relevant to that project's source code only.