Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Fix text sizing for onboarding flow (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
EasyVector committed Sep 2, 2021
1 parent 1869d26 commit 8619012
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -102,7 +102,12 @@ public Completable animateText2() {

return Observable.range(0, text.length())
.zipWith(Observable.interval(ANIM_DURATION_PER_LETTER, TimeUnit.MILLISECONDS, mainThread()), (revealDistance, o) -> revealDistance)
.flatMapCompletable(revealLength -> Completable.fromAction(() -> setText(text.substring(0, revealLength + 1))));
.flatMapCompletable(revealLength -> Completable.fromAction(() -> {
setText(text.substring(0, revealLength + 1));
setGravity(Gravity.CENTER_VERTICAL);
setAutoSizeTextTypeWithDefaults(AppCompatTextView.AUTO_SIZE_TEXT_TYPE_UNIFORM);
setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
}));
}
}
}

0 comments on commit 8619012

Please sign in to comment.