Skip to content

Commit

Permalink
Fix app name on the AuthCredentialsFragment is not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderZhu committed Feb 2, 2024
1 parent 0f3e822 commit 287fd78
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.core.widget.doAfterTextChanged
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import by.kirich1409.viewbindingdelegate.viewBinding
import org.hyperskill.app.SharedResources
import org.hyperskill.app.android.HyperskillApp
import org.hyperskill.app.android.R
import org.hyperskill.app.android.auth.view.ui.navigation.AuthFlow
Expand All @@ -30,6 +29,7 @@ import ru.nobird.android.view.base.ui.extension.setTextIfChanged
import ru.nobird.android.view.base.ui.extension.showIfNotExists
import ru.nobird.android.view.redux.ui.extension.reduxViewModel
import ru.nobird.app.presentation.redux.container.ReduxView
import org.hyperskill.app.R as SharedRes

class AuthCredentialsFragment :
Fragment(R.layout.fragment_auth_email),
Expand Down Expand Up @@ -95,6 +95,10 @@ class AuthCredentialsFragment :
requireRouter().backTo(AuthSocialScreen())
}

viewBinding.signInToTextView.text = getString(
SharedRes.string.auth_sign_up_title,
getString(SharedRes.string.android_app_name)
)
viewBinding.root.addKeyboardVisibilityListener { isVisible ->
if (!isAdded) return@addKeyboardVisibilityListener
viewBinding.signInHyperskillLogoShapeableImageView.isVisible = !isVisible
Expand All @@ -119,7 +123,7 @@ class AuthCredentialsFragment :
is AuthCredentialsFeature.Action.ViewAction.OpenUrl ->
requireContext().openUrl(action.url)
is AuthCredentialsFeature.Action.ViewAction.ShowGetMagicLinkError ->
viewBinding.root.snackbar(SharedResources.strings.common_error.resourceId)
viewBinding.root.snackbar(SharedRes.string.common_error)
}
}

Expand Down
11 changes: 6 additions & 5 deletions androidHyperskillApp/src/main/res/layout/fragment_auth_email.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:fillViewport="true">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/authEmailFragment"
Expand All @@ -26,7 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="20dp"
android:text="@string/auth_log_in_title"
tools:text="@string/auth_log_in_title"
android:textAlignment="center"
android:textAppearance="?textAppearanceBody1"
app:layout_constraintEnd_toEndOf="parent"
Expand Down

0 comments on commit 287fd78

Please sign in to comment.