summaryrefslogtreecommitdiff
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/FirstFragment.kt11
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/MainActivity.kt6
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt3
3 files changed, 14 insertions, 6 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt b/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt
index 05e5673..e2fa6eb 100644
--- a/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/FirstFragment.kt
@@ -7,6 +7,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.navigation.fragment.findNavController
+import com.google.android.material.snackbar.Snackbar
/**
* A simple [Fragment] subclass as the default destination in the navigation.
@@ -24,8 +25,16 @@ class FirstFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- view.findViewById<Button>(R.id.button_first).setOnClickListener {
+ view.findViewById<Button>(R.id.news).setOnClickListener {
findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment)
}
+ 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()
+ }
+ 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()
+ }
}
} \ No newline at end of file
diff --git a/app/src/main/java/xyz/adjutor/aniki/MainActivity.kt b/app/src/main/java/xyz/adjutor/aniki/MainActivity.kt
index 162ed95..4ccae64 100644
--- a/app/src/main/java/xyz/adjutor/aniki/MainActivity.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/MainActivity.kt
@@ -14,12 +14,10 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)
setSupportActionBar(findViewById(R.id.toolbar))
- findViewById<FloatingActionButton>(R.id.fab).setOnClickListener { view ->
- Snackbar.make(view, "HA? YOU THOUGHT IT WAS A FEATURE !? BUT IT WAS I, DIO !", Snackbar.LENGTH_LONG)
+ findViewById<FloatingActionButton>(R.id.info).setOnClickListener { view ->
+ Snackbar.make(view, "HA? YOU THOUGHT IT WAS AN INFO !? BUT IT WAS I, DIO !", Snackbar.LENGTH_LONG)
.setAction("Action", null).show()
}
- 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.")
-
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
diff --git a/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt b/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt
index a994c61..2e215c4 100644
--- a/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/SecondFragment.kt
@@ -24,8 +24,9 @@ class SecondFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- view.findViewById<Button>(R.id.button_second).setOnClickListener {
+ view.findViewById<Button>(R.id.home).setOnClickListener {
findNavController().navigate(R.id.action_SecondFragment_to_FirstFragment)
}
+ 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