ReportViewController

class ReportViewController : ViewController

Ties a ReportView to a Report.

Since

8.30

Parameters

fragmentActivity
the Activity holding the ReportView.
reportView
an inflated/constructed ReportView.
reportId
the report's ID.

Constructors

Link copied to clipboard
constructor(fragmentActivity: FragmentActivity, lifecycleOwner: LifecycleOwner, reportView: ReportView, reportId: String)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addReportEventListener(onReportEvent: (event: ReportEvent) -> Unit)

Adds a callback to be notified of various events and requests from this ReportViewController so that an enclosing Activity can appropriately handle requests or react to events. An enclosing Activity might implement a listener like this:

Link copied to clipboard

Handle a back action instigated elsewhere in the app. This method should be called, for example, from the owning Activity's onBackPressed method.

Link copied to clipboard

Needs to be called by the implementing activity to support the selection of ContextMenu items

Link copied to clipboard

Needs to be called by the implementing activity to support the creation of ContextMenus

Link copied to clipboard

Called whenever an item in your options menu is selected. This method should be called, for example, from the owning Activity's onOptionsItemSelected method.

Link copied to clipboard

Prepares the standard options menu to be displayed. This method should be called, for example, from the owning Activity's onPrepareOptionsMenu method.

Link copied to clipboard
fun removeReportEventListener(onReportEvent: (event: ReportEvent) -> Unit)

Removes a callback that was previously added with addReportEventListener.