aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/xyz/adjutor/aniki
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-02-12 12:35:33 +0100
committerClyhtsuriva <aimeric@adjutor.xyz>2021-02-12 12:35:33 +0100
commit97ff499413e5dae958ac3741616e2ee84a188871 (patch)
tree57c5be176a2f5b3e117d0730503d38b08607d4a9 /app/src/main/java/xyz/adjutor/aniki
parent416450b33960588984d88659d596703e84c8c2d5 (diff)
Adding Article and Top Manga pages.
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki')
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt31
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/HomePage.kt6
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/NewsPage.kt2
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt31
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