Skip to content

Commit

Permalink
add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Mar 11, 2022
1 parent 754ecff commit d212101
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import com.ethosa.ktc.R
import com.ethosa.ktc.databinding.LayoutSettingsButtonBinding
import com.ethosa.ktc.ui.fragments.SettingsFragment

/**
* Provides settings behavior.
*/
class SettingsAdapter (
private val fragment: SettingsFragment
) : RecyclerView.Adapter<SettingsAdapter.ViewHolder>() {
Expand All @@ -20,6 +23,9 @@ class SettingsAdapter (
private var actions: TypedArray = fragment.requireContext()
.resources.obtainTypedArray(R.array.settings_actions)

/**
* Provides RecyclerView.ViewHolder behavior
*/
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val binding = LayoutSettingsButtonBinding.bind(view)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import android.view.View
import android.view.ViewGroup
import com.ethosa.ktc.databinding.FragmentAboutAppBinding

/**
* Provides About app fragment behavior.
*/
class AboutAppFragment : Fragment() {
private var _binding: FragmentAboutAppBinding? = null

private val binding get() = _binding!!

override fun onCreateView(
Expand All @@ -23,6 +25,7 @@ class AboutAppFragment : Fragment() {
_binding = FragmentAboutAppBinding.inflate(inflater, container, false)

binding.authorGithub.setOnClickListener {
// Go to Github repo
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse("https://github.com/ethosa/ktc")
startActivity(intent)
Expand Down

0 comments on commit d212101

Please sign in to comment.