mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-12-22 20:40:16 +02:00
MOB-38 MOB-40 PIN1 save functionality added, pin/can nav order changed
This commit is contained in:
parent
1dd11b21fc
commit
2678fd3c42
@ -49,7 +49,7 @@ class CanFragment : Fragment() {
|
|||||||
|
|
||||||
// If CAN is already set
|
// If CAN is already set
|
||||||
private fun skip() {
|
private fun skip() {
|
||||||
findNavController().navigate(R.id.action_canFragment_to_authFragment)
|
findNavController().navigate(R.id.action_canFragment_to_pinFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Might need some rework, must break it up and make logic better.
|
// Might need some rework, must break it up and make logic better.
|
||||||
@ -73,10 +73,10 @@ class CanFragment : Fragment() {
|
|||||||
viewModel.storeCan(
|
viewModel.storeCan(
|
||||||
requireContext()
|
requireContext()
|
||||||
)
|
)
|
||||||
findNavController().navigate(R.id.action_canFragment_to_authFragment)
|
findNavController().navigate(R.id.action_canFragment_to_pinFragment)
|
||||||
}
|
}
|
||||||
setNegativeButton(R.string.deny_text) { _, _ ->
|
setNegativeButton(R.string.deny_text) { _, _ ->
|
||||||
findNavController().navigate(R.id.action_canFragment_to_authFragment)
|
findNavController().navigate(R.id.action_canFragment_to_pinFragment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
builder.setMessage(R.string.can_save_request)
|
builder.setMessage(R.string.can_save_request)
|
||||||
|
@ -29,11 +29,12 @@ class HomeFragment : Fragment() {
|
|||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
viewModel.checkCan(requireContext())
|
viewModel.checkCan(requireContext())
|
||||||
|
viewModel.checkPin(requireContext())
|
||||||
binding!!.beginButton.setOnClickListener { goToNextFragment() }
|
binding!!.beginButton.setOnClickListener { goToNextFragment() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun goToNextFragment() {
|
private fun goToNextFragment() {
|
||||||
findNavController().navigate(R.id.action_homeFragment_to_pinFragment)
|
findNavController().navigate(R.id.action_homeFragment_to_canFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.tarkvaraprojekt.mobileauthapp
|
package com.tarkvaraprojekt.mobileauthapp
|
||||||
|
|
||||||
|
import android.app.AlertDialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@ -8,6 +9,7 @@ import android.widget.Toast
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
|
import androidx.navigation.fragment.navArgs
|
||||||
import com.tarkvaraprojekt.mobileauthapp.databinding.FragmentPinBinding
|
import com.tarkvaraprojekt.mobileauthapp.databinding.FragmentPinBinding
|
||||||
import com.tarkvaraprojekt.mobileauthapp.model.SmartCardViewModel
|
import com.tarkvaraprojekt.mobileauthapp.model.SmartCardViewModel
|
||||||
|
|
||||||
@ -20,6 +22,9 @@ class PinFragment : Fragment() {
|
|||||||
|
|
||||||
private var binding: FragmentPinBinding? = null
|
private var binding: FragmentPinBinding? = null
|
||||||
|
|
||||||
|
// Navigation arguments. saving = true means that we are navigating here from the settings menu and must return to the settings
|
||||||
|
private val args: CanFragmentArgs by navArgs()
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
@ -31,12 +36,18 @@ class PinFragment : Fragment() {
|
|||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
if (viewModel.userPin.length in 4..12) {
|
||||||
|
skip()
|
||||||
|
}
|
||||||
|
if (args.saving) {
|
||||||
|
binding!!.nextButton.text = getString(R.string.save_text)
|
||||||
|
}
|
||||||
binding!!.nextButton.setOnClickListener { goToNextFragment() }
|
binding!!.nextButton.setOnClickListener { goToNextFragment() }
|
||||||
binding!!.cancelButton.setOnClickListener { goToTheStart() }
|
binding!!.cancelButton.setOnClickListener { goToTheStart() }
|
||||||
// Currently PIN 1 is not required and thus this step is immediately skipped.
|
}
|
||||||
// In the future the UI flow will be changed in the nav_graph.
|
|
||||||
goToNextFragment()
|
private fun skip() {
|
||||||
|
findNavController().navigate(R.id.action_pinFragment_to_authFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun goToNextFragment() {
|
private fun goToNextFragment() {
|
||||||
@ -45,20 +56,43 @@ class PinFragment : Fragment() {
|
|||||||
viewModel.setUserPin(
|
viewModel.setUserPin(
|
||||||
binding!!.pinEditText.editText?.text.toString()
|
binding!!.pinEditText.editText?.text.toString()
|
||||||
)
|
)
|
||||||
findNavController().navigate(R.id.action_pinFragment_to_canFragment)
|
if (args.saving) {
|
||||||
|
viewModel.storePin(requireContext())
|
||||||
|
findNavController().navigate(R.id.action_pinFragment_to_settingsFragment)
|
||||||
} else {
|
} else {
|
||||||
// Currently it is not important to enter PIN1 so we will allow the user to leave this field empty
|
val canStoreQuestion: AlertDialog? = activity?.let { frag ->
|
||||||
//Toast.makeText(requireContext(), getString(R.string.length_pin), Toast.LENGTH_SHORT)
|
val builder = AlertDialog.Builder(frag)
|
||||||
// .show()
|
builder.apply {
|
||||||
viewModel.setUserPin("1234")
|
setPositiveButton(R.string.save_text) { _, _ ->
|
||||||
findNavController().navigate(R.id.action_pinFragment_to_canFragment)
|
viewModel.storePin(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
findNavController().navigate(R.id.action_pinFragment_to_authFragment)
|
||||||
|
}
|
||||||
|
setNegativeButton(R.string.deny_text) { _, _ ->
|
||||||
|
findNavController().navigate(R.id.action_pinFragment_to_authFragment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
builder.setMessage(R.string.pin_save_request)
|
||||||
|
builder.setTitle(R.string.save_pin_title)
|
||||||
|
builder.create()
|
||||||
|
}
|
||||||
|
canStoreQuestion?.show()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Toast.makeText(requireContext(), getString(R.string.length_pin), Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun goToTheStart() {
|
private fun goToTheStart() {
|
||||||
|
if (args.saving) {
|
||||||
|
findNavController().navigate(R.id.action_pinFragment_to_settingsFragment)
|
||||||
|
} else {
|
||||||
viewModel.clearUserInfo()
|
viewModel.clearUserInfo()
|
||||||
findNavController().navigate(R.id.action_pinFragment_to_homeFragment)
|
findNavController().navigate(R.id.action_pinFragment_to_homeFragment)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.Button
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
@ -11,14 +12,19 @@ import com.tarkvaraprojekt.mobileauthapp.R
|
|||||||
import com.tarkvaraprojekt.mobileauthapp.databinding.FragmentSettingsBinding
|
import com.tarkvaraprojekt.mobileauthapp.databinding.FragmentSettingsBinding
|
||||||
import com.tarkvaraprojekt.mobileauthapp.model.SmartCardViewModel
|
import com.tarkvaraprojekt.mobileauthapp.model.SmartCardViewModel
|
||||||
|
|
||||||
|
/**
|
||||||
// Currently CAN is not actually saved, only UI part is implemented
|
* This fragment allows the user to save the CAN and the PIN 1 and also to delete them if necessary.
|
||||||
|
* Should only be accessible for the user from the HomeFragment and not during the
|
||||||
|
* authentication process itself.
|
||||||
|
*/
|
||||||
class SettingsFragment : Fragment() {
|
class SettingsFragment : Fragment() {
|
||||||
|
|
||||||
private val viewModel: SmartCardViewModel by activityViewModels()
|
private val viewModel: SmartCardViewModel by activityViewModels()
|
||||||
|
|
||||||
private var binding: FragmentSettingsBinding? = null
|
private var binding: FragmentSettingsBinding? = null
|
||||||
|
|
||||||
|
private var showPin: Boolean = false
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
@ -30,6 +36,18 @@ class SettingsFragment : Fragment() {
|
|||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
showCanField()
|
||||||
|
showPinField()
|
||||||
|
togglePinButton()
|
||||||
|
binding!!.canMenuAction.setOnClickListener { canAction() }
|
||||||
|
binding!!.pinMenuAction.setOnClickListener { pinAction() }
|
||||||
|
binding!!.pinMenuShow.setOnClickListener { togglePin() }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method for showing the CAN field to the user and can be used to refresh the field as well.
|
||||||
|
*/
|
||||||
|
private fun showCanField() {
|
||||||
if (viewModel.userCan.length == 6) {
|
if (viewModel.userCan.length == 6) {
|
||||||
binding!!.canSaved.text = getString(R.string.saved_can, viewModel.userCan)
|
binding!!.canSaved.text = getString(R.string.saved_can, viewModel.userCan)
|
||||||
binding!!.canMenuAction.text = getString(R.string.can_delete)
|
binding!!.canMenuAction.text = getString(R.string.can_delete)
|
||||||
@ -37,23 +55,73 @@ class SettingsFragment : Fragment() {
|
|||||||
binding!!.canSaved.text = getString(R.string.saved_can, getString(R.string.missing))
|
binding!!.canSaved.text = getString(R.string.saved_can, getString(R.string.missing))
|
||||||
binding!!.canMenuAction.text = getString(R.string.can_add)
|
binding!!.canMenuAction.text = getString(R.string.can_add)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method that allows the user to delete saved CAN from the device and also to save new a CAN if
|
||||||
|
* currently there is no CAN saved.
|
||||||
|
*/
|
||||||
|
private fun canAction() {
|
||||||
|
if (viewModel.userCan.length == 6) {
|
||||||
|
viewModel.deleteCan(requireContext())
|
||||||
|
showCanField()
|
||||||
|
} else {
|
||||||
|
val action = SettingsFragmentDirections.actionSettingsFragmentToCanFragment(true)
|
||||||
|
findNavController().navigate(action)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method for showing the PIN 1 field to the user and can be used to refresh the field as well.
|
||||||
|
* The PIN 1 is hidden by default and when it is hidden it is always shown as **** despite the
|
||||||
|
* length of the PIN 1. Can be made visible with toggle button.
|
||||||
|
*/
|
||||||
|
private fun showPinField() {
|
||||||
if (viewModel.userPin.length in 4..12) {
|
if (viewModel.userPin.length in 4..12) {
|
||||||
|
binding!!.pinMenuShow.visibility = Button.VISIBLE
|
||||||
|
if (showPin)
|
||||||
binding!!.pinSaved.text = getString(R.string.saved_pin, viewModel.userPin)
|
binding!!.pinSaved.text = getString(R.string.saved_pin, viewModel.userPin)
|
||||||
|
else
|
||||||
|
binding!!.pinSaved.text = getString(R.string.saved_pin, getString(R.string.hidden_pin))
|
||||||
binding!!.pinMenuAction.text = getString(R.string.pin1_delete)
|
binding!!.pinMenuAction.text = getString(R.string.pin1_delete)
|
||||||
} else {
|
} else {
|
||||||
|
binding!!.pinMenuShow.visibility = Button.GONE
|
||||||
binding!!.pinSaved.text = getString(R.string.saved_pin, getString(R.string.missing))
|
binding!!.pinSaved.text = getString(R.string.saved_pin, getString(R.string.missing))
|
||||||
binding!!.pinMenuAction.text = getString(R.string.pin1_add)
|
binding!!.pinMenuAction.text = getString(R.string.pin1_add)
|
||||||
}
|
}
|
||||||
binding!!.canMenuAction.setOnClickListener {
|
|
||||||
if (viewModel.userCan.length != 6) {
|
|
||||||
val action = SettingsFragmentDirections.actionSettingsFragmentToCanFragment(true)
|
|
||||||
findNavController().navigate(action)
|
|
||||||
} else {
|
|
||||||
// If can in ViewModel is 6 we know that we can only delete it.
|
|
||||||
viewModel.deleteCan(requireContext())
|
|
||||||
binding!!.canSaved.text = getString(R.string.saved_can, "puudub")
|
|
||||||
binding!!.canMenuAction.text = getString(R.string.can_add)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method that allows the user to delete saved PIN 1 from the device and also to save a new PIN 1 if
|
||||||
|
* currently there is no PIN 1 saved.
|
||||||
|
*/
|
||||||
|
private fun pinAction() {
|
||||||
|
if (viewModel.userPin.length in 4..12) {
|
||||||
|
viewModel.deletePin(requireContext())
|
||||||
|
showPinField()
|
||||||
|
} else {
|
||||||
|
val action = SettingsFragmentDirections.actionSettingsFragmentToPinFragment(true)
|
||||||
|
findNavController().navigate(action)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides the PIN 1 or makes it visible.
|
||||||
|
*/
|
||||||
|
private fun togglePin() {
|
||||||
|
showPin = !showPin
|
||||||
|
togglePinButton()
|
||||||
|
showPinField()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the text on the button that controls the visiblity of the PIN 1.
|
||||||
|
*/
|
||||||
|
private fun togglePinButton() {
|
||||||
|
if (showPin) {
|
||||||
|
binding!!.pinMenuShow.text = getString(R.string.hide)
|
||||||
|
} else {
|
||||||
|
binding!!.pinMenuShow.text = getString(R.string.show)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,4 +83,23 @@ class SmartCardViewModel: ViewModel() {
|
|||||||
_userCan = ""
|
_userCan = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun storePin(context: Context) {
|
||||||
|
val sharedPreferences: SharedPreferences = getSharedPreferences(context)
|
||||||
|
sharedPreferences.edit().putString("PIN1", userPin).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun checkPin(context: Context) {
|
||||||
|
val sharedPreferences: SharedPreferences = getSharedPreferences(context)
|
||||||
|
val foundPin = sharedPreferences.getString("PIN1", null)
|
||||||
|
foundPin?.let {
|
||||||
|
_userPin = it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun deletePin(context: Context) {
|
||||||
|
val sharedPreferences: SharedPreferences = getSharedPreferences(context)
|
||||||
|
sharedPreferences.edit().remove("PIN1").apply()
|
||||||
|
_userPin = ""
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -12,7 +12,7 @@
|
|||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -42,11 +42,22 @@
|
|||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/saved_pin"/>
|
android:text="@string/saved_pin"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/pin_menu_action"
|
android:id="@+id/pin_menu_action"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/pin_menu_show"
|
||||||
|
android:layout_margin="12dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
@ -9,39 +9,45 @@
|
|||||||
android:id="@+id/homeFragment"
|
android:id="@+id/homeFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.HomeFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.HomeFragment"
|
||||||
android:label="fragment_home"
|
android:label="fragment_home"
|
||||||
tools:layout="@layout/fragment_home" >
|
tools:layout="@layout/fragment_home">
|
||||||
<action
|
|
||||||
android:id="@+id/action_homeFragment_to_pinFragment"
|
|
||||||
app:destination="@id/pinFragment"
|
|
||||||
/>
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_homeFragment_to_settingsFragment"
|
android:id="@+id/action_homeFragment_to_settingsFragment"
|
||||||
app:destination="@id/settingsFragment" />
|
app:destination="@id/settingsFragment"
|
||||||
|
app:popUpTo="@id/homeFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_homeFragment_to_canFragment"
|
||||||
|
app:destination="@id/canFragment"
|
||||||
|
app:popUpTo="@id/homeFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/pinFragment"
|
android:id="@+id/pinFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.PinFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.PinFragment"
|
||||||
android:label="fragment_pin"
|
android:label="fragment_pin"
|
||||||
tools:layout="@layout/fragment_pin" >
|
tools:layout="@layout/fragment_pin">
|
||||||
<action
|
|
||||||
android:id="@+id/action_pinFragment_to_canFragment"
|
|
||||||
app:destination="@id/canFragment"
|
|
||||||
app:popUpTo="@id/homeFragment" />
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_pinFragment_to_homeFragment"
|
android:id="@+id/action_pinFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment"
|
||||||
app:popUpTo="@id/homeFragment"
|
app:popUpTo="@id/homeFragment"
|
||||||
app:popUpToInclusive="true" />
|
app:popUpToInclusive="true" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_pinFragment_to_settingsFragment"
|
||||||
|
app:destination="@id/settingsFragment"
|
||||||
|
app:popUpTo="@id/settingsFragment"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
<argument
|
||||||
|
android:name="saving"
|
||||||
|
android:defaultValue="false"
|
||||||
|
app:argType="boolean" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_pinFragment_to_authFragment"
|
||||||
|
app:destination="@id/authFragment"
|
||||||
|
app:popUpTo="@id/homeFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/canFragment"
|
android:id="@+id/canFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.CanFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.CanFragment"
|
||||||
android:label="fragment_can"
|
android:label="fragment_can"
|
||||||
tools:layout="@layout/fragment_can" >
|
tools:layout="@layout/fragment_can">
|
||||||
<action
|
|
||||||
android:id="@+id/action_canFragment_to_authFragment"
|
|
||||||
app:destination="@id/authFragment"
|
|
||||||
app:popUpTo="@id/homeFragment"/>
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_canFragment_to_homeFragment"
|
android:id="@+id/action_canFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment"
|
||||||
@ -51,21 +57,25 @@
|
|||||||
android:id="@+id/action_canFragment_to_settingsFragment"
|
android:id="@+id/action_canFragment_to_settingsFragment"
|
||||||
app:destination="@id/settingsFragment"
|
app:destination="@id/settingsFragment"
|
||||||
app:popUpTo="@id/settingsFragment"
|
app:popUpTo="@id/settingsFragment"
|
||||||
app:popUpToInclusive="true"/>
|
app:popUpToInclusive="true" />
|
||||||
<argument
|
<argument
|
||||||
android:name="saving"
|
android:name="saving"
|
||||||
app:argType="boolean"
|
android:defaultValue="false"
|
||||||
android:defaultValue="false" />
|
app:argType="boolean" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_canFragment_to_pinFragment"
|
||||||
|
app:destination="@id/pinFragment"
|
||||||
|
app:popUpTo="@id/homeFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/authFragment"
|
android:id="@+id/authFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.AuthFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.AuthFragment"
|
||||||
android:label="fragment_auth"
|
android:label="fragment_auth"
|
||||||
tools:layout="@layout/fragment_auth" >
|
tools:layout="@layout/fragment_auth">
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_authFragment_to_userFragment"
|
android:id="@+id/action_authFragment_to_userFragment"
|
||||||
app:destination="@id/userFragment"
|
app:destination="@id/userFragment"
|
||||||
app:popUpTo="@id/homeFragment"/>
|
app:popUpTo="@id/homeFragment" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_authFragment_to_homeFragment"
|
android:id="@+id/action_authFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment"
|
||||||
@ -76,20 +86,23 @@
|
|||||||
android:id="@+id/userFragment"
|
android:id="@+id/userFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.UserFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.UserFragment"
|
||||||
android:label="fragment_user"
|
android:label="fragment_user"
|
||||||
tools:layout="@layout/fragment_user" >
|
tools:layout="@layout/fragment_user">
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_userFragment_to_homeFragment"
|
android:id="@+id/action_userFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment"
|
||||||
app:popUpTo="@id/homeFragment"
|
app:popUpTo="@id/homeFragment"
|
||||||
app:popUpToInclusive="true"/>
|
app:popUpToInclusive="true" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/settingsFragment"
|
android:id="@+id/settingsFragment"
|
||||||
android:name="com.tarkvaraprojekt.mobileauthapp.menu.SettingsFragment"
|
android:name="com.tarkvaraprojekt.mobileauthapp.menu.SettingsFragment"
|
||||||
android:label="fragment_settings"
|
android:label="fragment_settings"
|
||||||
tools:layout="@layout/fragment_settings" >
|
tools:layout="@layout/fragment_settings">
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_settingsFragment_to_canFragment"
|
android:id="@+id/action_settingsFragment_to_canFragment"
|
||||||
app:destination="@id/canFragment" />
|
app:destination="@id/canFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_settingsFragment_to_pinFragment"
|
||||||
|
app:destination="@id/pinFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
</navigation>
|
</navigation>
|
@ -15,6 +15,8 @@
|
|||||||
<string name="enter_pin">PIN 1</string>
|
<string name="enter_pin">PIN 1</string>
|
||||||
<string name="example_pin">Näide. 1234</string>
|
<string name="example_pin">Näide. 1234</string>
|
||||||
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
||||||
|
<string name="pin_save_request">Praegu ei ole rakenduses PIN 1 salvestatud. Kas sa soovid sisestatud PIN 1-te salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud PIN 1-te saab alati menüüs muuta ja kustutada.</string>
|
||||||
|
<string name="save_pin_title">Salvesta PIN 1</string>
|
||||||
|
|
||||||
<!-- string resources for CanFragment -->
|
<!-- string resources for CanFragment -->
|
||||||
<string name="example_can">Näide. 123456</string>
|
<string name="example_can">Näide. 123456</string>
|
||||||
@ -23,7 +25,7 @@
|
|||||||
<string name="length_can">CANi pikkus on vale</string>
|
<string name="length_can">CANi pikkus on vale</string>
|
||||||
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
||||||
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
||||||
<string name="can_save_request">Praegu ei ole rakenduses CANi salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string>
|
<string name="can_save_request">Praegu ei ole rakenduses CAN salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string>
|
||||||
<string name="save_can_title">Salvesta CAN</string>
|
<string name="save_can_title">Salvesta CAN</string>
|
||||||
|
|
||||||
<!-- string resources for AuthFragment layout -->
|
<!-- string resources for AuthFragment layout -->
|
||||||
@ -48,4 +50,8 @@
|
|||||||
<string name="saved_pin">PIN1: %s</string>
|
<string name="saved_pin">PIN1: %s</string>
|
||||||
<string name="pin1_add">Lisa PIN1</string>
|
<string name="pin1_add">Lisa PIN1</string>
|
||||||
<string name="pin1_delete">Kustuta PIN1</string>
|
<string name="pin1_delete">Kustuta PIN1</string>
|
||||||
|
<string name="missing">puudub</string>
|
||||||
|
<string name="show">NÄITA</string>
|
||||||
|
<string name="hide">PEIDA</string>
|
||||||
|
<string name="hidden_pin">****</string>
|
||||||
</resources>
|
</resources>
|
@ -14,6 +14,8 @@
|
|||||||
<string name="enter_pin">PIN 1</string>
|
<string name="enter_pin">PIN 1</string>
|
||||||
<string name="example_pin">Näide. 1234</string>
|
<string name="example_pin">Näide. 1234</string>
|
||||||
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
||||||
|
<string name="pin_save_request">Praegu ei ole rakenduses PIN 1 salvestatud. Kas sa soovid sisestatud PIN 1-te salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud PIN 1-te saab alati menüüs muuta ja kustutada.</string>
|
||||||
|
<string name="save_pin_title">Salvesta PIN 1</string>
|
||||||
|
|
||||||
<!-- string resources for CanFragment -->
|
<!-- string resources for CanFragment -->
|
||||||
<string name="example_can">Näide. 123456</string>
|
<string name="example_can">Näide. 123456</string>
|
||||||
@ -22,7 +24,7 @@
|
|||||||
<string name="length_can">CANi pikkus on vale</string>
|
<string name="length_can">CANi pikkus on vale</string>
|
||||||
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
||||||
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
||||||
<string name="can_save_request">Praegu ei ole rakenduses CANi salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string> <string name="save_can_title">Salvesta CAN</string>
|
<string name="can_save_request">Praegu ei ole rakenduses CAN salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string> <string name="save_can_title">Salvesta CAN</string>
|
||||||
|
|
||||||
<!-- string resources for AuthFragment layout -->
|
<!-- string resources for AuthFragment layout -->
|
||||||
<string name="auth_instruction_text">ID kaardiga ühenduse loomiseks pane kaart vastu telefoni</string>
|
<string name="auth_instruction_text">ID kaardiga ühenduse loomiseks pane kaart vastu telefoni</string>
|
||||||
@ -46,4 +48,8 @@
|
|||||||
<string name="saved_pin">PIN1: %s</string>
|
<string name="saved_pin">PIN1: %s</string>
|
||||||
<string name="pin1_add">Lisa PIN1</string>
|
<string name="pin1_add">Lisa PIN1</string>
|
||||||
<string name="pin1_delete">Kustuta PIN1</string>
|
<string name="pin1_delete">Kustuta PIN1</string>
|
||||||
|
<string name="missing">puudub</string>
|
||||||
|
<string name="show">NÄITA</string>
|
||||||
|
<string name="hide">PEIDA</string>
|
||||||
|
<string name="hidden_pin">****</string>
|
||||||
</resources>
|
</resources>
|
@ -13,6 +13,8 @@
|
|||||||
<string name="enter_pin">PIN 1</string>
|
<string name="enter_pin">PIN 1</string>
|
||||||
<string name="example_pin">Näide. 1234</string>
|
<string name="example_pin">Näide. 1234</string>
|
||||||
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
<string name="length_pin">PIN 1 lubatud pikkus on 4..12</string>
|
||||||
|
<string name="pin_save_request">Praegu ei ole rakenduses PIN 1 salvestatud. Kas sa soovid sisestatud PIN 1-te salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud PIN 1-te saab alati menüüs muuta ja kustutada.</string>
|
||||||
|
<string name="save_pin_title">Salvesta PIN 1</string>
|
||||||
|
|
||||||
<!-- string resources for CanFragment -->
|
<!-- string resources for CanFragment -->
|
||||||
<string name="example_can">Näide. 123456</string>
|
<string name="example_can">Näide. 123456</string>
|
||||||
@ -21,7 +23,7 @@
|
|||||||
<string name="length_can">CANi pikkus on vale</string>
|
<string name="length_can">CANi pikkus on vale</string>
|
||||||
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
<string name="card_detected">Kaart on tuvastatud. Hoia kaarti vastu telefoni.</string>
|
||||||
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
<string name="data_read">Andmed loetud. Võid edasi minna.</string>
|
||||||
<string name="can_save_request">Praegu ei ole rakenduses CANi salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string>
|
<string name="can_save_request">Praegu ei ole rakenduses CAN salvestatud. Kas sa soovid sisestatud CANi salvestada? Sellisel juhul sisestatakse see järgmisel korral automaatselt. Salvestatud CANi saab alati menüüs muuta ja kustutada.</string>
|
||||||
<string name="save_can_title">Salvesta CAN</string>
|
<string name="save_can_title">Salvesta CAN</string>
|
||||||
|
|
||||||
<!-- string resources for AuthFragment layout -->
|
<!-- string resources for AuthFragment layout -->
|
||||||
@ -44,7 +46,10 @@
|
|||||||
<string name="can_add">Lisa CAN</string>
|
<string name="can_add">Lisa CAN</string>
|
||||||
<string name="can_delete">Kustuta CAN</string>
|
<string name="can_delete">Kustuta CAN</string>
|
||||||
<string name="saved_pin">PIN1: %s</string>
|
<string name="saved_pin">PIN1: %s</string>
|
||||||
<string name="pin1_add">Lisa PIN1</string>
|
<string name="pin1_add">Lisa PIN 1</string>
|
||||||
<string name="pin1_delete">Kustuta PIN1</string>
|
<string name="pin1_delete">Kustuta PIN 1</string>
|
||||||
<string name="missing">puudub</string>
|
<string name="missing">puudub</string>
|
||||||
|
<string name="show">NÄITA</string>
|
||||||
|
<string name="hide">PEIDA</string>
|
||||||
|
<string name="hidden_pin">****</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user