diff --git a/app/src/main/java/dev/refox/anitrack/ui/WatchListFragment.kt b/app/src/main/java/dev/refox/anitrack/ui/WatchListFragment.kt index 7711c65..7913509 100644 --- a/app/src/main/java/dev/refox/anitrack/ui/WatchListFragment.kt +++ b/app/src/main/java/dev/refox/anitrack/ui/WatchListFragment.kt @@ -1,5 +1,8 @@ package dev.refox.anitrack.ui +import android.app.Dialog +import android.graphics.Color +import android.graphics.drawable.ColorDrawable import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater @@ -8,6 +11,7 @@ import android.view.ViewGroup import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.LinearLayoutManager +import dev.refox.anitrack.R import dev.refox.anitrack.adapters.AnimeWatchListAdapter import dev.refox.anitrack.database.* import dev.refox.anitrack.databinding.FragmentWatchListBinding @@ -53,6 +57,17 @@ class WatchListFragment : Fragment() { animeWatchListAdapter.notifyDataSetChanged() }) + binding.btnInfo.setOnClickListener { + val dialogBinding = layoutInflater.inflate(R.layout.info_dialog, null) + val dialog = Dialog(requireContext()) + + dialog.setContentView(dialogBinding) + dialog.setCancelable(true) + dialog.setCanceledOnTouchOutside(true) + dialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) + dialog.show() + } + return binding.root diff --git a/app/src/main/res/drawable/ic_baseline_info_24.xml b/app/src/main/res/drawable/ic_baseline_info_24.xml new file mode 100644 index 0000000..ae8429f --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_info_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/fragment_watch_list.xml b/app/src/main/res/layout/fragment_watch_list.xml index a319f91..8f9e78e 100644 --- a/app/src/main/res/layout/fragment_watch_list.xml +++ b/app/src/main/res/layout/fragment_watch_list.xml @@ -29,6 +29,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 846037f..f7e9dc2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -9,6 +9,7 @@ Second Fragment Next Previous + Tip: \n\n Press and hold and click Add to Library in the Search Section to add an anime to Watchlist Hello first fragment Hello second fragment. Arg: %1$s