All Projects → pranavpandey → dynamic-motion

pranavpandey / dynamic-motion

Licence: Apache-2.0 license
Provide additional functionality to Android MotionLayout.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to dynamic-motion

EZAnchor
An easier and faster way to code Autolayout
Stars: ✭ 25 (-26.47%)
Mutual labels:  layout, constraint
Tinyconstraints
Nothing but sugar.
Stars: ✭ 3,721 (+10844.12%)
Mutual labels:  layout, constraint
Motion Shapeofview
Explain how to use MotionLayout with ShapeOfView
Stars: ✭ 236 (+594.12%)
Mutual labels:  layout, motion
Flexml
🚀基于Litho的Android高性能动态业务容器。
Stars: ✭ 225 (+561.76%)
Mutual labels:  layout
Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (+585.29%)
Mutual labels:  layout
PandaDemo
Demo project for asynchronous render and Layout framework Panda
Stars: ✭ 15 (-55.88%)
Mutual labels:  layout
flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (-20.59%)
Mutual labels:  layout
Pinterestlayout
Custom collection view layout inspired by Pinterest layout. Written in Swift.
Stars: ✭ 219 (+544.12%)
Mutual labels:  layout
form-bunch
Form-bunch is a component like plugin that make it easier to write form, you could add the most of components what you want to form-bunch for build various form.
Stars: ✭ 18 (-47.06%)
Mutual labels:  layout
Typography
C# Font Reader (TrueType / OpenType / OpenFont / CFF / woff / woff2) , Glyphs Layout and Rendering
Stars: ✭ 246 (+623.53%)
Mutual labels:  layout
React Css Grid
React layout component based on CSS Grid Layout and built with styled-components
Stars: ✭ 239 (+602.94%)
Mutual labels:  layout
Magic Grid
A simple, lightweight Javascript library for dynamic grid layouts.
Stars: ✭ 2,827 (+8214.71%)
Mutual labels:  layout
use-spring
Hooke's law hook
Stars: ✭ 53 (+55.88%)
Mutual labels:  motion
Uicollectionviewsplitlayout
UICollectionViewSplitLayout makes collection view more responsive.
Stars: ✭ 226 (+564.71%)
Mutual labels:  layout
ReactZooApp
ReactZooApp
Stars: ✭ 33 (-2.94%)
Mutual labels:  motion
Hiddensearchwithrecyclerview
Simple library to have a hidden/shown search bar
Stars: ✭ 220 (+547.06%)
Mutual labels:  layout
opensim-moco
Solve optimal control problems for musculoskeletal models using OpenSim and direct collocation.
Stars: ✭ 45 (+32.35%)
Mutual labels:  motion
React Native Text Size
Measure text accurately before laying it out and get font information from your App.
Stars: ✭ 238 (+600%)
Mutual labels:  layout
Cassowary Rs
A Rust implementation of the Cassowary constraint solving algorithm
Stars: ✭ 247 (+626.47%)
Mutual labels:  layout
standard-components
A specification for functional UI components
Stars: ✭ 52 (+52.94%)
Mutual labels:  layout

Dynamic Motion

License Build Status Release

A library to provide additional functionality for MotionLayout on Android 4.3 (API 18) and above.

Since v1.0.0, it is dependent on Java 8.

It has DynamicMotionLayout which has a built-in ViewPager to create parallax effects which will open a huge set of possibilities for the original MotionLayout.


Contents


Installation

It can be installed by adding the following dependency to your build.gradle file:

dependencies {
    implementation 'com.pranavpandey.android:dynamic-motion:1.0.1'
}

Usage

It is divided into 3 simple steps and whole layout can be configured by just using the xml files.

For a complete reference, please read the documentation.

Replace

First, replace the original MotionLayout with DynamicMotionLayout in xml file.

<com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    ...
    >

    ...
</com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout>

Page count

Set page count for ViewPager to divide the transition between different pages.

<com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:adm_pageCount="4"
    ...
    >

    ...
</com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout>
// At runtime
dynamicMotionLayout.setPageCount(int, @Nullable ViewPager2.OnPageChangeCallback);

Motion scene

Add a motion scene and use KeyFrameSet and KeyAttribute to animate the views across different pages. Please check the sample for a demo scene.

<com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:layoutDescription="@xml/motion_scene"
    app:adm_pageCount="4"
    ...
    >

    ...
</com.pranavpandey.android.dynamic.motion.widget.DynamicMotionLayout>

Author

Pranav Pandey

GitHub Follow on Twitter Donate via PayPal


License

Copyright 2018-2022 Pranav Pandey

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].