-class FontSizeDialog: DialogFragment() {
- // The public interface is used to send information back to the parent activity.
- interface UpdateFontSizeListener {
- fun onApplyNewFontSize(dialogFragment: DialogFragment?)
- }
-
- // Declare the class variables.
- private lateinit var updateFontSizeListener: UpdateFontSizeListener
-
- override fun onAttach(context: Context) {
- // Run the default commands.
- super.onAttach(context)
-
- // Get a handle for the update font size listener from the launching context.
- updateFontSizeListener = context as UpdateFontSizeListener
- }
-