use of me.dkzwm.widget.srl.manager.HScaleLayoutManager in project SmoothRefreshLayout by dkzwm.
the class TestHorizontalScaleEffectActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_horizontal_scale_effect);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setTitle(R.string.test_horizontal_scale_effect);
SmoothRefreshLayout refreshLayout = findViewById(R.id.smoothRefreshLayout_test_horizontal_scale_effect);
refreshLayout.setDisableLoadMore(false);
refreshLayout.setDurationToClose(800);
refreshLayout.setLayoutManager(new HScaleLayoutManager());
Interpolator interpolator = new Interpolator() {
@Override
public float getInterpolation(float input) {
return (float) (--input * input * ((1.7 + 1f) * input + 1.7) + 1f);
}
};
refreshLayout.setSpringBackInterpolator(interpolator);
}
Aggregations