ArcActivity
abstract class ArcActivity<viewBinding : ViewBinding>(@IdRes hostId: Int? = null) : AppCompatActivity, NavigationDelegate
ArcActivity define base class for Activity for project
Author
jimlyas
Since
16 Sep 2022
Parameters
viewBinding
ViewBinding class to be implemented for this class
hostId
Resource Id of androidx.fragment.app.FragmentContainerView inside the Activity
Functions
Link copied to clipboard
Function to check if application has permission
Link copied to clipboard
Function to check if the application has permissions
fun checkPermissions(permissions: List<String>, onPermissionGranted: () -> Unit, onPermissionNotGranted: () -> Unit)
Function to check permission to the user
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Function to pick image from gallery
Link copied to clipboard
fun requestPermissionsSafely(permissions: Array<String>, onPermissionGranted: () -> Unit? = null, onPermissionNotGranted: () -> Unit? = null)
Function to request permission to user
Link copied to clipboard
fun ArcActivity<*>.setupCameraX(view: PreviewView, lensFacing: Int = LENS_FACING_BACK): CameraXSetup
Function to configure CameraXSetup from given ArcActivity and also adding androidx.camera.core.Preview
Link copied to clipboard
fun setupToolbar(toolbar: Toolbar?, title: String?, isChild: Boolean, menu: Int?, onMenuListener: (Int) -> Boolean?)
Function to set ArcActivity's Toolbar
Link copied to clipboard
inline fun <activity : ArcActivity<*>> start(isFinished: Boolean = false, flags: List<Int> = listOf(), args: MutableMap<String, Serializable> = mutableMapOf())
Function start another ArcActivity within the application
Properties
Link copied to clipboard
instance of androidx.navigation.NavController that has been embedded to the androidx.fragment.app.FragmentContainerView