summaryrefslogtreecommitdiff
path: root/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-05-16 16:46:12 +0200
committerFlorian Dold <florian@dold.me>2022-05-16 16:46:12 +0200
commite6e58ecebe107deeb4a050652fc53c899beab3a6 (patch)
treef2047b0435fca5f45b3577a4a71f8e75f82ae22a /anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
parent22e5e8034d2891f04568e724baa8b5c95660b897 (diff)
downloadtaler-android-master.tar.gz
taler-android-master.tar.bz2
taler-android-master.zip
-migrate away from deprecated library (Kotlin synthetics)HEADmaster
Diffstat (limited to 'anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt')
-rw-r--r--anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt19
1 files changed, 16 insertions, 3 deletions
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
index d8f0185..ef2e190 100644
--- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
+++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
@@ -22,21 +22,34 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
-import kotlinx.android.synthetic.main.fragment_intro.*
+import org.gnu.anastasis.ui.databinding.FragmentIntroBinding
class IntroFragment : Fragment() {
+ private var _binding: FragmentIntroBinding? = null
+
+ // This property is only valid between onCreateView and
+ // onDestroyView.
+ private val binding get() = _binding!!
+
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
- return inflater.inflate(R.layout.fragment_intro, container, false)
+ _binding = FragmentIntroBinding.inflate(inflater, container, false)
+ val view = binding.root
+ return view
+ }
+
+ override fun onDestroyView() {
+ super.onDestroyView()
+ _binding = null
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- button.setOnClickListener {
+ binding.button.setOnClickListener {
findNavController().navigate(R.id.action_nav_anastasis_intro_to_nav_anastasis_identity)
}
}