diff options
Diffstat (limited to 'app/src/main/java/xyz')
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt | 31 | ||||
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/HomePage.kt | 6 | ||||
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/NewsPage.kt | 2 | ||||
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt | 31 |
4 files changed, 65 insertions, 5 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt b/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt new file mode 100644 index 0000000..68af902 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt @@ -0,0 +1,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 + +/** + * A simple [Fragment] subclass as the second destination in the navigation. + */ +class ArticlePage : Fragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.article_page, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + view.findViewById<Button>(R.id.home).setOnClickListener { + findNavController().navigate(R.id.action_ArticlePage_to_HomePage) + } + } +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/HomePage.kt b/app/src/main/java/xyz/adjutor/aniki/HomePage.kt index 377a523..8b932ee 100644 --- a/app/src/main/java/xyz/adjutor/aniki/HomePage.kt +++ b/app/src/main/java/xyz/adjutor/aniki/HomePage.kt @@ -29,12 +29,10 @@ class HomePage : Fragment() { findNavController().navigate(R.id.action_HomePage_to_NewsPage) } view.findViewById<Button>(R.id.article).setOnClickListener { - Snackbar.make(view, "HA? YOU THOUGHT IT WAS AN ARTICLE !? BUT IT WAS I, DIO !", Snackbar.LENGTH_LONG) - .setAction("Action", null).show() + findNavController().navigate(R.id.action_HomePage_to_ArticlePage) } view.findViewById<Button>(R.id.top_manga).setOnClickListener { - Snackbar.make(view, "HA? YOU THOUGHT IT WAS A TOP !? BUT IT WAS I, DIO !", Snackbar.LENGTH_LONG) - .setAction("Action", null).show() + findNavController().navigate(R.id.action_HomePage_to_TopMangaPage) } } }
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt b/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt index 88427fa..6d7b10d 100644 --- a/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt +++ b/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt @@ -27,6 +27,6 @@ class NewsPage : Fragment() { view.findViewById<Button>(R.id.home).setOnClickListener { findNavController().navigate(R.id.action_NewsPage_to_HomePage) } - val industryNews = News(0,"Horror Manga Ajin Ends Nine-Year Serialization","Gamon Sakurai's Ajin (Ajin: Demi-Human) manga ended its nine-year run in the March issue of good! Afternoon on Friday.") + //val industryNews = News(0,"Horror Manga Ajin Ends Nine-Year Serialization","Gamon Sakurai's Ajin (Ajin: Demi-Human) manga ended its nine-year run in the March issue of good! Afternoon on Friday.") } }
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt b/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt new file mode 100644 index 0000000..c64b9fe --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt @@ -0,0 +1,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 + +/** + * A simple [Fragment] subclass as the second destination in the navigation. + */ +class TopMangaPage : Fragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.top_manga_page, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + view.findViewById<Button>(R.id.home).setOnClickListener { + findNavController().navigate(R.id.action_TopMangaPage_to_HomePage) + } + } +}
\ No newline at end of file |