blob: 59d7c6291a2b15540a4044208dc99790ad618d03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package xyz.adjutor.aniki
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.navigation.fragment.findNavController
class HomePage : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.home_page, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
view.findViewById<Button>(R.id.button_top_manga).setOnClickListener {
findNavController().navigate(R.id.action_HomePage_to_TopMangaPage)
}
view.findViewById<Button>(R.id.button_top_anime).setOnClickListener {
findNavController().navigate(R.id.action_HomePage_to_TopAnimePage)
}
}
}
|