mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-12-22 04:20:16 +02:00
MOB-14 change text style and removed unnecessary logs
This commit is contained in:
parent
804b4472e8
commit
7582a317bf
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/user_name"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/identification_number_label"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name_label"
|
||||
app:layout_constraintBottom_toTopOf="@id/identification_number_label"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name_label" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/identification_number_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/identification_number_label"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/identification_number"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name"
|
||||
app:layout_constraintBottom_toTopOf="@id/identification_number"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/identification_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/clear_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/identification_number_label"
|
||||
app:layout_constraintBottom_toTopOf="@id/clear_button"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/identification_number_label" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/clear_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clear_text"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/identification_number"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/clear_button"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/identification_number" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -9,7 +9,6 @@
|
||||
|
||||
<string name="begin_text">Begin</string>
|
||||
<string name="next_text">Next</string>
|
||||
<string name="clear_text">Clear</string>
|
||||
<string name="cancel_text">Cancel</string>
|
||||
|
||||
<string name="enter_can">Enter CAN</string>
|
||||
@ -19,4 +18,5 @@
|
||||
<string name="user_name_label">NIMI</string>
|
||||
<string name="user_name">%1$s %2$s</string>
|
||||
<string name="identification_number_label">ISIKUKOOD</string>
|
||||
<string name="clear_button">UNUSTA</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user