toolkit / com.sas.android.visualanalytics.report.controller / ReportViewController

ReportViewController

class ReportViewController : ViewController

Ties a ReportView to a Report.

Parameters

activity -

    the Activity holding the ReportView.

reportView -

    an inflated/constructed ReportView.

reportId -

    the report's ID.

Since
8.30

Constructors

<init>

ReportViewController(activity: FragmentActivity, reportView: ReportView, reportId: String)

Ties a ReportView to a Report.

Functions

addReportEventListener

fun addReportEventListener(onReportEvent: (event: ReportEvent) -> Unit): 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:

onActivityResult

fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Unit

Ensure that the screen mirroring feature is enabled/disabled as appropriate. Should be called by enclosing activity.

onBackPressed

fun onBackPressed(): Boolean

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

onOptionsItemSelected

fun onOptionsItemSelected(item: MenuItem): Boolean

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

onPrepareOptionsMenu

fun onPrepareOptionsMenu(menu: Menu): Unit

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

removeReportEventListener

fun removeReportEventListener(onReportEvent: (event: ReportEvent) -> Unit): Unit

Removes a callback that was previously added with addReportEventListener.

Copyright © 2018 by SAS Institute Inc., Cary, NC, USA. All Rights Reserved.