- // Initialize the database helper. The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
- val bookmarksDatabaseHelper = BookmarksDatabaseHelper(context, null, null, 0)
+ // Set the radio button listeners. These perform a click on the linear layout, which contains the necessary logic.
+ defaultIconRadioButton.setOnClickListener { defaultIconLinearLayout.performClick() }
+ webpageFavoriteIconRadioButton.setOnClickListener { webpageFavoriteIconLinearLayout.performClick() }
+
+ // Set the default icon linear layout click listener.
+ defaultIconLinearLayout.setOnClickListener {
+ // Check the default icon radio button.
+ defaultIconRadioButton.isChecked = true
+
+ // Uncheck the webpage favorite icon radio button.
+ webpageFavoriteIconRadioButton.isChecked = false
+ }
+
+ // Set the webpage favorite icon linear layout click listener.
+ webpageFavoriteIconLinearLayout.setOnClickListener {
+ // Check the webpage favorite icon radio button.
+ webpageFavoriteIconRadioButton.isChecked = true
+
+ // Uncheck the default icon radio button.
+ defaultIconRadioButton.isChecked = false
+ }
+
+ // Initialize the database helper.
+ val bookmarksDatabaseHelper = BookmarksDatabaseHelper(requireContext())