Added a "buy me a coffee" button to InfoFragment.kt

This commit is contained in:
Arty Bishop committed 2020-10-24 20:26:38 +01:00
1 parent 1c766abd24
commit 04fc4fd3aa
7 files changed
+86 -59

No files matched your search

@@ -36,14 +36,18 @@ class InfoFragment : Fragment(R.layout.fragment_info) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
FragmentInfoBinding.bind(view).apply {
version.text = String.format(getString(R.string.app_version), BuildConfig.VERSION_NAME)
btnGithub.setOnClickListener {
infoVersion.text =
String.format(getString(R.string.info_version), BuildConfig.VERSION_NAME)
infoGithub.setOnClickListener {
gotoUrl("https://github.com/rt-bishop/Look4Sat/")
}
btnFdroid.setOnClickListener {
infoFdroid.setOnClickListener {
gotoUrl("https://f-droid.org/en/packages/com.rtbishop.look4sat/")
}
message.movementMethod = LinkMovementMethod.getInstance()
infoBmc.setOnClickListener {
gotoUrl("https://www.buymeacoffee.com/rtbishop")
}
infoThanks.movementMethod = LinkMovementMethod.getInstance()
}
}