/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.controller.homeviewcontroller/TKUIHomeViewControllerFragment/Companion/newInstance
newInstance
\ fun newInstance(defaultLocation: LatLng? = null, bottomSheetVisibilityCallback: (Int) -> Unit? = null, showMyLocationButtonWithoutPermission: Boolean = false, onBackPressOnEmptyBottomSheetCallback: (OnBackPressedCallback) -> Unit? = null): TKUIHomeViewControllerFragment
Create TKUIHomeViewControllerFragment instance
Return
TKUIHomeViewControllerFragment new instance
Parameters
androidJvm
defaultLocation | to set map default location after it loads |
bottomSheetVisibilityCallback | Callback to detect if TKUIHomeViewControllerFragment bottom sheet is hidden (0) or visible (1) |
showMyLocationButtonWithoutPermission | when true, show my location button even if Manifest.permission.ACCESS_FINE_LOCATION is not yet granted and permission request will be asked once the button is clicked.Will hide the button if false. |
onBackPressOnEmptyBottomSheetCallback | callback to be triggered when user clicked back button and TKUIHomeViewControllerFragment's TKUIHomeBottomSheetFragment is empty so the action can be handled on the parent activity/fragment. Including OnBackPressedCallback in the callback for the parent to remove(OnBackPressedCallback.remove or not (i.e. you want to close parent activity on backpress when TKUIHomeBottomSheetFragment is empty) |