override fun onViewCreated()

in automotive/src/main/java/com/example/android/uamp/automotive/SignInLandingPageFragment.kt [86:122]


    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        val context = requireContext()

        toolbar = view.findViewById(R.id.toolbar)
        appIcon = view.findViewById(R.id.app_icon)
        primaryTextView = view.findViewById(R.id.primary_message)
        footerTextView = view.findViewById(R.id.footer)
        phoneSignInButton = view.findViewById(R.id.phone_sign_in_button)
        googleSignInButton = view.findViewById(R.id.google_sign_in_button)

        if (ENABLE_USERNAME_PASSWORD_SIGN_IN) {
            usernameAndPasswordSignInButton = view.findViewById(R.id.sign_in_button)
            identifierContainer = view.findViewById(R.id.identifier_container)
            identifierInput = view.findViewById(R.id.identifier_input)

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                identifierInput.setAutofillHints(AUTOFILL_HINT_USERNAME)
            }
        }

        toolbar.setNavigationOnClickListener { requireActivity().finish() }

        appIcon.setImageDrawable(context.getDrawable(R.drawable.aural_logo))
        primaryTextView.text = getString(R.string.sign_in_primary_text)

        // Links in footer text should be clickable.
        footerTextView.text = HtmlCompat.fromHtml(
            context.getString(R.string.sign_in_footer),
            HtmlCompat.FROM_HTML_MODE_LEGACY
        )
        footerTextView.movementMethod = LinkMovementMethod.getInstance()

        configureUsernameAndPasswordSignIn()
        configurePhoneSignIn()
        configureGoogleSignIn()
    }