From 804b4472e879c98b87fd11d647ed0e272e26dc96 Mon Sep 17 00:00:00 2001 From: Henrik Lepson Date: Sun, 3 Oct 2021 13:28:09 +0300 Subject: [PATCH] MOB-14 changed the placement of views inside the layout --- MobileAuthApp/.idea/misc.xml | 2 +- .../mobileauthapp/UserFragment.kt | 5 +-- .../app/src/main/res/layout/fragment_user.xml | 45 +++++++------------ .../app/src/main/res/values/strings.xml | 8 ++-- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/MobileAuthApp/.idea/misc.xml b/MobileAuthApp/.idea/misc.xml index 0921839..c160b5d 100644 --- a/MobileAuthApp/.idea/misc.xml +++ b/MobileAuthApp/.idea/misc.xml @@ -8,7 +8,7 @@ - + diff --git a/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt b/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt index 554bbc1..6e59a8c 100644 --- a/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt +++ b/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt @@ -36,9 +36,8 @@ class UserFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - binding!!.firstName.text = getString(R.string.info_text, "First name", viewModel.userFirstName) - binding!!.lastName.text = getString(R.string.info_text, "Last name", viewModel.userLastName) - binding!!.identificationNumber.text = getString(R.string.info_text, "Idenfitication number", viewModel.userIdentificationNumber) + binding!!.userName.text = getString(R.string.user_name, viewModel.userFirstName, viewModel.userLastName) + binding!!.identificationNumber.text = viewModel.userIdentificationNumber binding!!.clearButton.setOnClickListener { goToTheStart() } } diff --git a/MobileAuthApp/app/src/main/res/layout/fragment_user.xml b/MobileAuthApp/app/src/main/res/layout/fragment_user.xml index cc6c542..5a61b9e 100644 --- a/MobileAuthApp/app/src/main/res/layout/fragment_user.xml +++ b/MobileAuthApp/app/src/main/res/layout/fragment_user.xml @@ -8,53 +8,42 @@ tools:context=".UserFragment"> + app:layout_constraintTop_toBottomOf="@id/user_name_label" + app:layout_constraintBottom_toTopOf="@id/identification_number_label"/> - -