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 6e59a8c..5e7735a 100644
--- a/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt
+++ b/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/UserFragment.kt
@@ -18,8 +18,6 @@ import com.tarkvaraprojekt.mobileauthapp.model.SmartCardViewModel
*/
class UserFragment : Fragment() {
- private val TAG = UserFragment::class.java.name
-
private val viewModel: SmartCardViewModel by activityViewModels()
private var binding: FragmentUserBinding? = null
@@ -36,14 +34,14 @@ class UserFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- binding!!.userName.text = getString(R.string.user_name, viewModel.userFirstName, viewModel.userLastName)
+ binding!!.userName.text =
+ getString(R.string.user_name, viewModel.userFirstName, viewModel.userLastName)
binding!!.identificationNumber.text = viewModel.userIdentificationNumber
binding!!.clearButton.setOnClickListener { goToTheStart() }
}
private fun goToTheStart() {
viewModel.clearUserInfo()
- Log.i(TAG, "First name value after clearUserInfo ${viewModel.userFirstName}")
findNavController().navigate(R.id.action_userFragment_to_homeFragment)
}
diff --git a/MobileAuthApp/app/src/main/res/layout/fragment_user.xml b/MobileAuthApp/app/src/main/res/layout/fragment_user.xml
index 5a61b9e..528a365 100644
--- a/MobileAuthApp/app/src/main/res/layout/fragment_user.xml
+++ b/MobileAuthApp/app/src/main/res/layout/fragment_user.xml
@@ -11,49 +11,56 @@
android:id="@+id/user_name_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/user_name_label"
android:layout_marginTop="24dp"
+ android:text="@string/user_name_label"
+ android:textSize="14sp"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintEnd_toEndOf="parent" />
+ app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toBottomOf="@id/user_name_label" />
+ app:layout_constraintTop_toBottomOf="@id/user_name" />
+ app:layout_constraintTop_toBottomOf="@id/identification_number_label" />
+ app:layout_constraintTop_toBottomOf="@id/identification_number" />
\ No newline at end of file
diff --git a/MobileAuthApp/app/src/main/res/values/strings.xml b/MobileAuthApp/app/src/main/res/values/strings.xml
index 1fe5079..01a226d 100644
--- a/MobileAuthApp/app/src/main/res/values/strings.xml
+++ b/MobileAuthApp/app/src/main/res/values/strings.xml
@@ -9,7 +9,6 @@
Begin
Next
- Clear
Cancel
Enter CAN
@@ -19,4 +18,5 @@
NIMI
%1$s %2$s
ISIKUKOOD
+ UNUSTA
\ No newline at end of file