Comments (2)
I checked out the source code of the EasingInterpolator library, and it seems that this interpolator implements the TimeInterpolator interface from the Android framework.
public class EasingInterpolator implements TimeInterpolator {
private final Ease ease;
public EasingInterpolator(@NonNull Ease ease) {
this.ease = ease;
}
@Override
public float getInterpolation(float input) {
return EasingProvider.get(this.ease, input);
}
public Ease getEase() {
return ease;
}
}
Version 1.0.1 of ExpandableTextView added support for TimeInterpolators:
/**
* Sets a {@link TimeInterpolator} for expanding and collapsing.
* @param interpolator the interpolator
*/
public void setInterpolator(final TimeInterpolator interpolator)
{
this.expandInterpolator = interpolator;
this.collapseInterpolator = interpolator;
}
/**
* Sets a {@link TimeInterpolator} for expanding.
* @param expandInterpolator the interpolator
*/
public void setExpandInterpolator(final TimeInterpolator expandInterpolator)
{
this.expandInterpolator = expandInterpolator;
}
/**
* Sets a {@link TimeInterpolator} for collpasing.
* @param collapseInterpolator the interpolator
*/
public void setCollapseInterpolator(final TimeInterpolator collapseInterpolator)
{
this.collapseInterpolator = collapseInterpolator;
}
So the only thing you have to do is add ExpandableTextView (1.0.1) and EasingInterpolator as a dependency to your project and set EasingInterpolator as interpolator for ExpandableTextView.
Can you confirm this works for you?
from android-expandabletextview.
It works well with EasingInterpolator library.
from android-expandabletextview.
Related Issues (20)
- Android 8 issue HOT 11
- Extras \n\n on expand HOT 3
- unable to set setOnExpandListener HOT 2
- 1.1.0 HOT 10
- toggling in the middle of an animation HOT 1
- Duration consideration with variable lines HOT 1
- OvershootInterpolator issue HOT 1
- Facing issue while using custom fonts. HOT 5
- For Expandablelistview with JSON data HOT 1
- Dynamic edittext id in android
- Odd layout with gravity="center" and ellipsize="end" HOT 1
- How to set Text Alignment Justified for the text ? HOT 1
- How determine if need expand the text? HOT 1
- A way to cache the views after adding?
- ExpandableTextView does not work with the Spannable String
- How can I use this with RecyclerView
- `ExnpandableTextView` doesn't maintain expanded state changes between orientation/config changes HOT 1
- how to remove animation?
- Don't work well in recyclerview
- To Add Custom Expand / Collapse Text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-expandabletextview.