aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/HomePage.kt (renamed from app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt)6
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/News.kt6
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/NewsPage.kt (renamed from app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt)6
3 files changed, 9 insertions, 9 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt b/app/src/main/java/xyz/adjutor/aniki/HomePage.kt
index e2fa6eb..377a523 100644
--- a/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/HomePage.kt
@@ -12,21 +12,21 @@ import com.google.android.material.snackbar.Snackbar
/**
* A simple [Fragment] subclass as the default destination in the navigation.
*/
-class FirstFragment : Fragment() {
+class HomePage : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_first, container, false)
+ 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.news).setOnClickListener {
- findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment)
+ 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)
diff --git a/app/src/main/java/xyz/adjutor/aniki/News.kt b/app/src/main/java/xyz/adjutor/aniki/News.kt
index dea3516..d38a556 100644
--- a/app/src/main/java/xyz/adjutor/aniki/News.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/News.kt
@@ -1,7 +1,7 @@
package xyz.adjutor.aniki
data class News (
- val id: Int,
- val title: String,
- val description: String
+ val id: Int,
+ val title: String,
+ val description: String
) \ No newline at end of file
diff --git a/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt b/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt
index 2e215c4..88427fa 100644
--- a/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/NewsPage.kt
@@ -11,21 +11,21 @@ import androidx.navigation.fragment.findNavController
/**
* A simple [Fragment] subclass as the second destination in the navigation.
*/
-class SecondFragment : Fragment() {
+class NewsPage : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_second, container, false)
+ return inflater.inflate(R.layout.news_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_SecondFragment_to_FirstFragment)
+ 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.")
}