summaryrefslogtreecommitdiff
path: root/anastasis-ui/src/main/java/org/gnu/anastasis/ui/IntroFragment.kt
diff options
context:
space:
mode:
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)
}
}