Skip to content

Commit 3140867

Browse files
committed
bolding the account created username
1 parent be92fe2 commit 3140867

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthAccountCreatedFragment.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@
1616

1717
package im.vector.app.features.onboarding.ftueauth
1818

19+
import android.graphics.Typeface
1920
import android.os.Bundle
2021
import android.view.LayoutInflater
2122
import android.view.View
2223
import android.view.ViewGroup
24+
import androidx.core.text.toSpannable
2325
import androidx.core.view.isVisible
2426
import im.vector.app.R
2527
import im.vector.app.core.animations.play
2628
import im.vector.app.core.di.ActiveSessionHolder
2729
import im.vector.app.core.utils.isAnimationEnabled
30+
import im.vector.app.core.utils.styleMatchingText
2831
import im.vector.app.databinding.FragmentFtueAccountCreatedBinding
2932
import im.vector.app.features.onboarding.OnboardingAction
3033
import im.vector.app.features.onboarding.OnboardingViewEvents
@@ -47,7 +50,9 @@ class FtueAuthAccountCreatedFragment @Inject constructor(
4750
}
4851

4952
private fun setupViews() {
50-
views.accountCreatedSubtitle.text = getString(R.string.ftue_account_created_subtitle, activeSessionHolder.getActiveSession().myUserId)
53+
val userId = activeSessionHolder.getActiveSession().myUserId
54+
val subtitle = getString(R.string.ftue_account_created_subtitle, userId).toSpannable().styleMatchingText(userId, Typeface.BOLD)
55+
views.accountCreatedSubtitle.text = subtitle
5156
views.accountCreatedPersonalize.debouncedClicks { viewModel.handle(OnboardingAction.PersonalizeProfile) }
5257
views.accountCreatedTakeMeHome.debouncedClicks { viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnTakeMeHome)) }
5358
views.accountCreatedTakeMeHomeCta.debouncedClicks { viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnTakeMeHome)) }

vector/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@
19121912
<string name="ftue_account_created_personalize">Personalize profile</string>
19131913
<string name="ftue_account_created_take_me_home">Take me home</string>
19141914
<string name="ftue_account_created_congratulations_title">Congratulations!</string>
1915-
<string name="ftue_account_created_subtitle">Your account %s has been created.</string>
1915+
<string name="ftue_account_created_subtitle">Your account %s has been created</string>
19161916

19171917
<string name="ftue_display_name_title">Choose a display name</string>
19181918
<string name="ftue_display_name_subtitle">This will be shown when you send messages.</string>

0 commit comments

Comments
 (0)