Browse code

Initial commit (losing old history)

Dario Rodriguez authored on 08/04/2026 17:25:38
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+/*
2
+ * Copyright (c) 2023 Samson Achiaga
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package com.certified.audionote.ui
18
+
19
+import android.os.Bundle
20
+import android.view.LayoutInflater
21
+import android.view.View
22
+import android.view.ViewGroup
23
+import androidx.fragment.app.Fragment
24
+import androidx.navigation.NavController
25
+import androidx.navigation.Navigation
26
+import com.certified.audionote.databinding.FragmentAboutBinding
27
+import com.certified.audionote.utils.Extensions.safeNavigate
28
+
29
+class AboutFragment : Fragment() {
30
+
31
+    private var _binding: FragmentAboutBinding? = null
32
+    private val binding get() = _binding!!
33
+    private lateinit var navController: NavController
34
+
35
+    override fun onCreateView(
36
+        inflater: LayoutInflater, container: ViewGroup?,
37
+        savedInstanceState: Bundle?
38
+    ): View {
39
+        // Inflate the layout for this fragment
40
+        _binding = FragmentAboutBinding.inflate(layoutInflater, container, false)
41
+        return binding.root
42
+    }
43
+
44
+    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
45
+        super.onViewCreated(view, savedInstanceState)
46
+
47
+        navController = Navigation.findNavController(view)
48
+
49
+        binding.btnBack.setOnClickListener { navController.safeNavigate(AboutFragmentDirections.actionAboutFragmentToSettingsFragment()) }
50
+    }
51
+
52
+    override fun onDestroyView() {
53
+        super.onDestroyView()
54
+        _binding = null
55
+    }
56
+}
0 57
\ No newline at end of file