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

Fix text sizing for onboarding flow #505

Merged
merged 2 commits into from Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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));
}));
}
}
}