Skip to content

Commit

Permalink
Renamed methods
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Jun 24, 2016
1 parent 803c227 commit 13987de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected void onCreate(Bundle savedInstanceState) {
label.setSpan(labelSpan, 0, label.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
setButtonCtaLabel(label);

setPagerScrollDuration(800);
setPageScrollDuration(800);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
setPagerInterpolator(android.R.interpolator.fast_out_slow_in);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ public class IntroActivity extends AppCompatActivity {
private int autoplayCounter;
private long autoplayDelay;

private Interpolator pagerInterpolator;
private long pagerScrollDuration;
private Interpolator pageScrollInterpolator;
private long pageScrollDuration;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

pagerInterpolator = AnimationUtils.loadInterpolator(this, android.R.interpolator.accelerate_decelerate);
pagerScrollDuration = getResources().getInteger(android.R.integer.config_shortAnimTime);
pageScrollInterpolator = AnimationUtils.loadInterpolator(this, android.R.interpolator.accelerate_decelerate);
pageScrollDuration = getResources().getInteger(android.R.integer.config_shortAnimTime);

if (savedInstanceState != null) {
if (savedInstanceState.containsKey(KEY_CURRENT_ITEM)) {
Expand Down Expand Up @@ -329,8 +329,8 @@ else if (position < currentPosition && Math.ceil(position) != currentPosition &&
}
});

animator.setInterpolator(pagerInterpolator);
animator.setDuration(pagerScrollDuration);
animator.setInterpolator(pageScrollInterpolator);
animator.setDuration(pageScrollDuration);
animator.start();
}

Expand Down Expand Up @@ -828,24 +828,24 @@ public boolean isAutoplaying() {
return autoplayCallback != null;
}

public long getPagerScrollDuration() {
return pagerScrollDuration;
public long getPageScrollDuration() {
return pageScrollDuration;
}

public void setPagerScrollDuration(@IntRange(from = 1) long pagerScrollDuration) {
this.pagerScrollDuration = pagerScrollDuration;
public void setPageScrollDuration(@IntRange(from = 1) long pageScrollDuration) {
this.pageScrollDuration = pageScrollDuration;
}

public Interpolator getPagerInterpolator() {
return pagerInterpolator;
public Interpolator getPageScrollInterpolator() {
return pageScrollInterpolator;
}

public void setPagerInterpolator(Interpolator pagerInterpolator) {
this.pagerInterpolator = pagerInterpolator;
public void setPageScrollInterpolator(Interpolator pageScrollInterpolator) {
this.pageScrollInterpolator = pageScrollInterpolator;
}

public void setPagerInterpolator(@InterpolatorRes int interpolatorRes) {
this.pagerInterpolator = AnimationUtils.loadInterpolator(this, interpolatorRes);
this.pageScrollInterpolator = AnimationUtils.loadInterpolator(this, interpolatorRes);
}

@SuppressWarnings("unused")
Expand Down

0 comments on commit 13987de

Please sign in to comment.