### getLineStart Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/compose/ui/ui-text/api/restricted_current.txt Gets the start character index for a given line. ```APIDOC ## getLineStart ### Description Gets the start character index for a given line. ### Method public ### Parameters #### Path Parameters - **lineIndex** (int) - Required - The index of the line. ### Response #### Success Response - Returns the start character index as an integer. ``` -------------------------------- ### NavigationUI Setup Methods Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/restricted_current.txt Methods for setting up navigation controllers with various UI components. ```APIDOC ## NavigationUI Setup Methods ### Description Provides methods to set up navigation controllers with different UI elements to manage navigation actions. ### Methods #### `setupActionBarWithNavController` ##### Description Sets up an `AppCompatActivity`'s action bar to integrate with a `NavController`. ##### Parameters - **activity** (androidx.appcompat.app.AppCompatActivity) - Required - The activity to set up. - **navController** (androidx.navigation.NavController) - Required - The navigation controller. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - A drawer layout for navigation. - **configuration** (androidx.navigation.ui.AppBarConfiguration?) - Optional - Configuration for the app bar. ##### Request Example ```java NavigationUI.setupActionBarWithNavController(activity, navController, appBarConfiguration); ``` #### `setupWithNavController` (Toolbar) ##### Description Sets up a `Toolbar` to integrate with a `NavController`. ##### Parameters - **toolbar** (androidx.appcompat.widget.Toolbar) - Required - The toolbar to set up. - **navController** (androidx.navigation.NavController) - Required - The navigation controller. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - A drawer layout for navigation. - **configuration** (androidx.navigation.ui.AppBarConfiguration?) - Optional - Configuration for the app bar. ##### Request Example ```java NavigationUI.setupWithNavController(toolbar, navController, appBarConfiguration); ``` #### `setupWithNavController` (CollapsingToolbarLayout) ##### Description Sets up a `CollapsingToolbarLayout` to integrate with a `NavController`. ##### Parameters - **collapsingToolbarLayout** (com.google.android.material.appbar.CollapsingToolbarLayout) - Required - The collapsing toolbar layout. - **toolbar** (androidx.appcompat.widget.Toolbar) - Required - The toolbar. - **navController** (androidx.navigation.NavController) - Required - The navigation controller. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - A drawer layout for navigation. - **configuration** (androidx.navigation.ui.AppBarConfiguration?) - Optional - Configuration for the app bar. ##### Request Example ```java NavigationUI.setupWithNavController(collapsingToolbarLayout, toolbar, navController, appBarConfiguration); ``` #### `setupWithNavController` (NavigationBarView) ##### Description Sets up a `NavigationBarView` to integrate with a `NavController`. ##### Parameters - **navigationBarView** (com.google.android.material.navigation.NavigationBarView) - Required - The navigation bar view. - **navController** (androidx.navigation.NavController) - Required - The navigation controller. - **saveState** (boolean) - Optional - Whether to save the state. ##### Request Example ```java NavigationUI.setupWithNavController(navigationBarView, navController, true); ``` #### `setupWithNavController` (NavigationView) ##### Description Sets up a `NavigationView` to integrate with a `NavController`. ##### Parameters - **navigationView** (com.google.android.material.navigation.NavigationView) - Required - The navigation view. - **navController** (androidx.navigation.NavController) - Required - The navigation controller. - **saveState** (boolean) - Optional - Whether to save the state. ##### Request Example ```java NavigationUI.setupWithNavController(navigationView, navController, true); ``` ``` -------------------------------- ### Handle SSL Certificate Verification Error Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/docs/onboarding.md Example of an SSL CERTIFICATE_VERIFY_FAILED error encountered when downloading the Repo source. This typically requires installing SSL certificates for Python. ```shell Downloading Repo source from https://gerrit.googlesource.com/git-repo fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997) ``` -------------------------------- ### Navigation UI Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.8.0-beta06.txt Methods for setting up navigation controllers with UI components. ```APIDOC ## Navigation UI Setup Methods ### `setupActionBarWithNavController` #### Description Sets up the Activity's ActionBar to show and handle navigation when the NavController changes. #### Method `public static void setupActionBarWithNavController(androidx.appcompat.app.AppCompatActivity activity, androidx.navigation.NavController navController)` `public static void setupActionBarWithNavController(androidx.appcompat.app.AppCompatActivity activity, androidx.navigation.NavController navController, androidx.customview.widget.Openable? openableLayout)` `public static void setupActionBarWithNavController(androidx.appcompat.app.AppCompatActivity activity, androidx.navigation.NavController navController, optional androidx.navigation.ui.AppBarConfiguration configuration)` ### `setupWithNavController` for Toolbar #### Description Sets up a Toolbar to display the correct Navigation Up affordance and handle navigation events. #### Method `public static void setupWithNavController(androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController)` `public static void setupWithNavController(androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, androidx.customview.widget.Openable? openableLayout)` `public static void setupWithNavController(androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, optional androidx.navigation.ui.AppBarConfiguration configuration)` `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout collapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController)` `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout collapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, androidx.customview.widget.Openable? openableLayout)` `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout collapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, optional androidx.navigation.ui.AppBarConfiguration configuration)` ### `setupWithNavController` for NavigationBarView #### Description Sets up a NavigationBarView (like BottomNavigationView) to respond to navigation events. #### Method `public static void setupWithNavController(com.google.android.material.navigation.NavigationBarView navigationBarView, androidx.navigation.NavController navController)` `@SuppressCompatibility @androidx.navigation.ui.NavigationUiSaveStateControl public static void setupWithNavController(com.google.android.material.navigation.NavigationBarView navigationBarView, androidx.navigation.NavController navController, boolean saveState)` ### `setupWithNavController` for NavigationView #### Description Sets up a NavigationView (like DrawerNavigation) to respond to navigation events. #### Method `public static void setupWithNavController(com.google.android.material.navigation.NavigationView navigationView, androidx.navigation.NavController navController)` `public static void setupWithNavController(com.google.android.material.navigation.NavigationView navigationView, androidx.navigation.NavController navController)` `@SuppressCompatibility @androidx.navigation.ui.NavigationUiSaveStateControl public static void setupWithNavController(com.google.android.material.navigation.NavigationView navigationView, androidx.navigation.NavController navController, boolean saveState)` ### `navigateUp` #### Description Navigates the NavController up one level in the navigation hierarchy. #### Method `public static boolean navigateUp(androidx.navigation.NavController navController, androidx.navigation.ui.AppBarConfiguration configuration)` ### `onNavDestinationSelected` #### Description Handles the selection of a navigation destination from a menu item. #### Method `public static boolean onNavDestinationSelected(android.view.MenuItem item, androidx.navigation.NavController navController)` `@SuppressCompatibility @androidx.navigation.ui.NavigationUiSaveStateControl public static boolean onNavDestinationSelected(android.view.MenuItem item, androidx.navigation.NavController navController, boolean saveState)` ``` -------------------------------- ### Example Template for a Creation Demo (Java) Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/compose/remote/remote-creation/doc/guides/CREATION_DEMO_GUIDE.md This template demonstrates the structure of a typical RemoteCompose creation demo, including platform services initialization, writer setup, variable definition, and UI layout with drawing operations. ```java import static androidx.compose.remote.core.RcProfiles.PROFILE_ANDROIDX; import static androidx.compose.remote.creation.Rc.FloatExpression.MUL; import static androidx.compose.remote.creation.Rc.FloatExpression.ADD; import android.graphics.Color; import android.graphics.Paint; import androidx.compose.remote.creation.RemoteComposeWriterAndroid; import androidx.compose.remote.creation.modifiers.RecordingModifier; import androidx.compose.remote.creation.platform.AndroidxRcPlatformServices; import androidx.compose.remote.core.RcPlatformServices; public class MyDemo { static RcPlatformServices sPlatform = new AndroidxRcPlatformServices(); public static RemoteComposeWriterAndroid createDemo() { // 1. Initialize Writer (width, height, name, version, profile, platform) RemoteComposeWriterAndroid rc = new RemoteComposeWriterAndroid( 500, 500, "MyDemo", 7, PROFILE_ANDROIDX, sPlatform); // 2. Define dynamic variables float time = RemoteComposeWriterAndroid.TIME_IN_CONTINUOUS_SEC; float speed = rc.addFloatConstant(2.0f); float animatedValue = rc.floatExpression(time, speed, MUL); // 3. Define the UI Root rc.root(() -> { rc.box(new RecordingModifier().fillMaxSize().background(Color.LTGRAY), () -> { rc.startCanvas(new RecordingModifier().size(200, 200)); // Drawing operations rc.getPainter() .setColor(Color.BLUE) .setStyle(Paint.Style.FILL) .commit(); rc.drawCircle(100, 100, 50); rc.endCanvas(); }); }); return rc; } } ``` -------------------------------- ### Navigation UI Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/restricted_2.8.0-beta03.txt Methods for setting up navigation controllers with UI components. ```APIDOC ## Navigation UI Setup Methods ### Description Provides utility methods to connect Jetpack Navigation Controllers with various Android UI components, simplifying navigation management within activities and fragments. ### Methods #### `setupActionBarWithNavController` ##### Description Sets up the `ActionBar` (or `AppCompatActivity`'s support action bar) to display the correct Up/Home affordance when navigating. ##### Parameters - **activity** (AppCompatActivity) - The activity hosting the navigation controller. - **navController** (NavController) - The navigation controller to associate with the ActionBar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar, specifying top-level destinations. - **openableLayout** (Openable?, optional) - The `Openable` layout (e.g., `DrawerLayout`) to manage the Up affordance. #### `setupWithNavController` (Toolbar) ##### Description Sets up a `Toolbar` to display the correct Up/Home affordance when navigating. ##### Parameters - **toolbar** (Toolbar) - The Toolbar to configure. - **navController** (NavController) - The navigation controller to associate with the Toolbar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar, specifying top-level destinations. - **drawerLayout** (DrawerLayout?, optional) - The `DrawerLayout` to manage the Up affordance. #### `setupWithNavController` (CollapsingToolbarLayout) ##### Description Sets up a `CollapsingToolbarLayout` and its associated `Toolbar` to display the correct Up/Home affordance when navigating. ##### Parameters - **collapsingToolbarLayout** (CollapsingToolbarLayout) - The CollapsingToolbarLayout to configure. - **toolbar** (Toolbar) - The Toolbar within the CollapsingToolbarLayout. - **navController** (NavController) - The navigation controller to associate with the Toolbar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar, specifying top-level destinations. - **openableLayout** (Openable?, optional) - The `Openable` layout (e.g., `DrawerLayout`) to manage the Up affordance. #### `setupWithNavController` (NavigationBarView) ##### Description Sets up a `NavigationBarView` (like `BottomNavigationView` or `NavigationView`) to respond to navigation events. ##### Parameters - **navigationBarView** (NavigationBarView) - The navigation bar view to configure. - **navController** (NavController) - The navigation controller to associate with the navigation bar. - **saveState** (boolean, optional) - Whether to save and restore the state of the navigation bar. #### `setupWithNavController` (NavigationView) ##### Description Sets up a `NavigationView` to respond to navigation events. ##### Parameters - **navigationView** (NavigationView) - The NavigationView to configure. - **navController** (NavController) - The navigation controller to associate with the NavigationView. - **saveState** (boolean, optional) - Whether to save and restore the state of the navigation view. #### `navigateUp` ##### Description Navigates up the navigation hierarchy if possible. ##### Parameters - **navController** (NavController) - The navigation controller to use. - **configuration** (AppBarConfiguration) - Configuration for the AppBar, specifying top-level destinations. #### `onNavDestinationSelected` ##### Description Handles the selection of a navigation destination from a menu item. ##### Parameters - **item** (MenuItem) - The menu item that was selected. - **navController** (NavController) - The navigation controller to use. - **saveState** (boolean, optional) - Whether to save and restore the state of the navigation. ``` -------------------------------- ### Get ViewModel with Custom Creation Callback Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/hilt/hilt-navigation-fragment/api/current.txt Obtain a ViewModel instance scoped to the provided navigation graph ID, using a custom creation callback for advanced initialization. The callback allows for passing arguments or performing complex setup. ```APIDOC ## Get ViewModel with Custom Creation Callback ### Description Obtain a ViewModel instance scoped to the provided navigation graph ID, using a custom creation callback for advanced initialization. The callback allows for passing arguments or performing complex setup. ### Method `hiltNavGraphViewModels` (inline function) ### Endpoint N/A (This is a utility function, not an HTTP endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin // In a Fragment val myViewModel: MyViewModel by hiltNavGraphViewModels( navGraphId = R.id.my_nav_graph, creationCallback = { factory -> MyViewModel(someDependency = factory.get(), someArg = "initial") } ) ``` ### Response #### Success Response (ViewModel Instance) - **VM** (androidx.lifecycle.ViewModel) - The ViewModel instance scoped to the navigation graph, created via the callback. #### Response Example ```kotlin // The returned value is a Lazy which provides the ViewModel instance upon access. // Example access: val viewModelInstance = myViewModel ``` ``` -------------------------------- ### Navigation UI Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.9.0-beta01.txt Methods for setting up navigation controllers with UI components. ```APIDOC ## Navigation UI Setup Methods ### Description Provides utility methods to connect Jetpack Navigation Controllers with various Android UI components to manage navigation actions and display. ### Methods #### `setupActionBarWithNavController` ##### Description Sets up an `AppCompatActivity`'s ActionBar to display the correct Up/Home affordance when the `NavController` changes. ##### Parameters - **activity** (AppCompatActivity) - The activity hosting the ActionBar. - **navController** (NavController) - The NavController to link with the ActionBar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar. - **openableLayout** (Openable?, optional) - The DrawerLayout or other `Openable` layout to associate with the Up affordance. #### `setupWithNavController` (Toolbar) ##### Description Sets up a `Toolbar` to display the correct Up/Home affordance when the `NavController` changes. ##### Parameters - **toolbar** (Toolbar) - The Toolbar to set up. - **navController** (NavController) - The NavController to link with the Toolbar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar. - **drawerLayout** (DrawerLayout?, optional) - The DrawerLayout to associate with the Up affordance. #### `setupWithNavController` (CollapsingToolbarLayout) ##### Description Sets up a `CollapsingToolbarLayout` and its associated `Toolbar` to display the correct Up/Home affordance when the `NavController` changes. ##### Parameters - **collapsingToolbarLayout** (CollapsingToolbarLayout) - The CollapsingToolbarLayout to set up. - **toolbar** (Toolbar) - The Toolbar within the CollapsingToolbarLayout. - **navController** (NavController) - The NavController to link with the Toolbar. - **configuration** (AppBarConfiguration, optional) - Configuration for the AppBar. - **openableLayout** (Openable?, optional) - The DrawerLayout or other `Openable` layout to associate with the Up affordance. #### `setupWithNavController` (NavigationBarView) ##### Description Sets up a `NavigationBarView` (like `BottomNavigationView` or `NavigationView`) to navigate when a menu item is selected. ##### Parameters - **navigationBarView** (NavigationBarView) - The NavigationBarView to set up. - **navController** (NavController) - The NavController to link with the NavigationBarView. - **saveState** (boolean, optional) - Whether to save and restore the state of the navigation. #### `setupWithNavController` (NavigationView) ##### Description Sets up a `NavigationView` to navigate when a menu item is selected. ##### Parameters - **navigationView** (NavigationView) - The NavigationView to set up. - **navController** (NavController) - The NavController to link with the NavigationView. #### `navigateUp` ##### Description Navigates up in the navigation hierarchy. ##### Parameters - **navController** (NavController) - The NavController to use for navigation. - **configuration** (AppBarConfiguration) - The AppBarConfiguration to use. #### `onNavDestinationSelected` ##### Description Handles the selection of a navigation destination from a menu item. ##### Parameters - **item** (MenuItem) - The menu item that was selected. - **navController** (NavController) - The NavController to use for navigation. - **saveState** (boolean, optional) - Whether to save and restore the state of the navigation. ``` -------------------------------- ### Install Sample App APKs with ADB Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/car/app/app-samples/README.md Install a sample app APK to a device using the adb install command with the path to the generated APK. ```bash adb install ``` -------------------------------- ### ToolbarKt - setupWithNavController Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui-ktx/api/1.0.0-rc02.txt Sets up a Toolbar to sync with a NavController. ```APIDOC ## setupWithNavController (Toolbar) ### Description Sets up a Toolbar to sync with a NavController, updating its title and navigation behavior based on the current destination. ### Method `public static void setupWithNavController(android.support.v7.widget.Toolbar toolbar, androidx.navigation.NavController navController, android.support.v4.widget.DrawerLayout? drawerLayout)` ### Method `public static void setupWithNavController(android.support.v7.widget.Toolbar toolbar, androidx.navigation.NavController navController, optional androidx.navigation.ui.AppBarConfiguration configuration)` ### Parameters #### Method 1 Parameters - **toolbar** (android.support.v7.widget.Toolbar) - The Toolbar to set up. - **navController** (androidx.navigation.NavController) - The NavController that manages app navigation. - **drawerLayout** (android.support.v4.widget.DrawerLayout?) - An optional DrawerLayout to coordinate with. #### Method 2 Parameters - **toolbar** (android.support.v7.widget.Toolbar) - The Toolbar to set up. - **navController** (androidx.navigation.NavController) - The NavController that manages app navigation. - **configuration** (optional androidx.navigation.ui.AppBarConfiguration) - An optional AppBarConfiguration to customize behavior. ``` -------------------------------- ### setupWithNavController (CollapsingToolbarLayout) Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.8.0-beta05.txt Sets up a CollapsingToolbarLayout to display navigation information. ```APIDOC ## setupWithNavController (CollapsingToolbarLayout) ### Description Sets up a `CollapsingToolbarLayout` to display navigation information, such as the current destination's title, and to respond to navigation events. ### Method `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout collapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, androidx.drawerlayout.widget.DrawerLayout? drawerLayout)` `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout collapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, optional androidx.navigation.ui.AppBarConfiguration configuration)` ### Parameters #### Method 1 (with DrawerLayout) - **collapsingToolbarLayout** (com.google.android.material.appbar.CollapsingToolbarLayout) - The CollapsingToolbarLayout to configure. - **toolbar** (androidx.appcompat.widget.Toolbar) - The Toolbar to be used within the CollapsingToolbarLayout. - **navController** (androidx.navigation.NavController) - The NavController managing the navigation. - **drawerLayout** (androidx.drawerlayout.widget.DrawerLayout?) - Optional DrawerLayout to link with the navigation. #### Method 2 (with AppBarConfiguration) - **collapsingToolbarLayout** (com.google.android.material.appbar.CollapsingToolbarLayout) - The CollapsingToolbarLayout to configure. - **toolbar** (androidx.appcompat.widget.Toolbar) - The Toolbar to be used within the CollapsingToolbarLayout. - **navController** (androidx.navigation.NavController) - The NavController managing the navigation. - **configuration** (androidx.navigation.ui.AppBarConfiguration) - Configuration for the AppBar. ### Response This method does not return a value. It configures the CollapsingToolbarLayout and associated Toolbar. ### Request Example ```kotlin val collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar) val toolbar = findViewById(R.id.toolbar) val navController = findNavController(R.id.nav_host_fragment) val drawerLayout: DrawerLayout? = findViewById(R.id.drawer_layout) // Example usage with DrawerLayout setupWithNavController(collapsingToolbarLayout, toolbar, navController, drawerLayout) // Example usage with AppBarConfiguration val appBarConfig = AppBarConfiguration(setOf(R.id.home_destination), drawerLayout) setupWithNavController(collapsingToolbarLayout, toolbar, navController, appBarConfig) ``` ``` -------------------------------- ### Dynamic Install Manager Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-dynamic-features-runtime/api/restricted_2.8.0-beta02.txt Manages the installation of dynamic features. ```APIDOC ## DynamicInstallManager ### Description Manages the installation of dynamic features. ### Constructor ``` ctor public DynamicInstallManager(android.content.Context context, com.google.android.play.core.splitinstall.SplitInstallManager splitInstallManager); ``` ``` -------------------------------- ### Dynamic Install Manager Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-dynamic-features-runtime/api/2.8.0-beta03.txt Manages the installation of dynamic features. ```APIDOC ## DynamicInstallManager ### Description Manages the installation of dynamic features for the application. ### Constructor ```kotlin ctor public DynamicInstallManager(android.content.Context context, com.google.android.play.core.splitinstall.SplitInstallManager splitInstallManager); ``` ``` -------------------------------- ### Navigation UI Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.7.0-beta01.txt Utility methods for setting up navigation controllers with various UI components. ```APIDOC ## Navigation UI Setup Methods ### Description Provides static methods to assist in setting up navigation controllers with UI components such as App Bars, Toolbars, and Navigation Views. These methods simplify the process of connecting navigation actions to UI elements. ### Methods #### `setupActionBarWithNavController` ##### Description Sets up the activity's action bar to integrate with a `NavController`. This allows the action bar to display navigation-related information and handle navigation actions. ##### Parameters - **activity** (AppCompatActivity) - Required - The AppCompatActivity instance. - **navController** (NavController) - Required - The NavController to associate with the action bar. - **configuration** (AppBarConfiguration) - Optional - Configuration for the AppBar. - **openableLayout** (Openable?) - Optional - A layout that can be opened, typically a DrawerLayout. #### `setupWithNavController` (Toolbar) ##### Description Connects a `Toolbar` with a `NavController`. This enables the toolbar to display navigation destinations and handle navigation events. ##### Parameters - **toolbar** (Toolbar) - Required - The Toolbar to set up. - **navController** (NavController) - Required - The NavController to associate with the toolbar. - **configuration** (AppBarConfiguration) - Optional - Configuration for the AppBar. - **drawerLayout** (DrawerLayout?) - Optional - The DrawerLayout associated with the toolbar, if any. #### `setupWithNavController` (CollapsingToolbarLayout) ##### Description Connects a `CollapsingToolbarLayout` and its associated `Toolbar` with a `NavController`. This is useful for coordinating navigation with collapsing toolbars. ##### Parameters - **collapsingToolbarLayout** (CollapsingToolbarLayout) - Required - The CollapsingToolbarLayout. - **toolbar** (Toolbar) - Required - The Toolbar within the CollapsingToolbarLayout. - **navController** (NavController) - Required - The NavController to associate. - **configuration** (AppBarConfiguration) - Optional - Configuration for the AppBar. - **openableLayout** (Openable?) - Optional - A layout that can be opened, typically a DrawerLayout. #### `setupWithNavController` (NavigationBarView) ##### Description Connects a `NavigationBarView` (like BottomNavigationView) with a `NavController`. This synchronizes the navigation graph with the navigation bar. ##### Parameters - **navigationBarView** (NavigationBarView) - Required - The NavigationBarView. - **navController** (NavController) - Required - The NavController to associate. - **saveState** (boolean) - Optional - Whether to save and restore the state of the navigation. #### `setupWithNavController` (NavigationView) ##### Description Connects a `NavigationView` (like a NavigationDrawer) with a `NavController`. This integrates the navigation drawer with the navigation controller. ##### Parameters - **navigationView** (NavigationView) - Required - The NavigationView. - **navController** (NavController) - Required - The NavController to associate. - **saveState** (boolean) - Optional - Whether to save and restore the state of the navigation. #### `navigateUp` ##### Description Navigates the `NavController` up one level in the navigation hierarchy. This is typically called when the Up button in the action bar is pressed. ##### Parameters - **navController** (NavController) - Required - The NavController to navigate. - **configuration** (AppBarConfiguration) - Required - Configuration for the AppBar. #### `onNavDestinationSelected` ##### Description Handles the selection of a navigation destination from a menu item. This is commonly used in conjunction with `onOptionsItemSelected` or similar menu handling callbacks. ##### Parameters - **item** (MenuItem) - Required - The selected menu item. - **navController** (NavController) - Required - The NavController to navigate to the destination. - **saveState** (boolean) - Optional - Whether to save and restore the state of the navigation. ### Annotations #### `@NavigationUiSaveStateControl` ##### Description An annotation indicating that a function or method is responsible for controlling the saving and restoring of navigation state within the UI. ##### Target Functions ``` -------------------------------- ### Install project dependencies Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/development/plot-benchmarks/README.md Install all required dependencies for the project. ```bash # Installs the necessary dependencies. npm install ``` -------------------------------- ### setupWithNavController (CollapsingToolbarLayout) Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/restricted_current.txt Connects a CollapsingToolbarLayout with a Toolbar and NavController for integrated navigation feedback. ```APIDOC ## setupWithNavController (CollapsingToolbarLayout) ### Description Integrates a `CollapsingToolbarLayout` with a `Toolbar` and `NavController`. This allows the `CollapsingToolbarLayout` to display navigation-related information, such as the current destination's title, and can be used in conjunction with a `DrawerLayout`. ### Method `public static void setupWithNavController(com.google.android.material.appbar.CollapsingToolbarLayout, androidx.appcompat.widget.Toolbar toolbar, androidx.navigation.NavController navController, androidx.drawerlayout.widget.DrawerLayout? drawerLayout)` ### Endpoint N/A (This is a utility function, not a REST endpoint) ### Parameters - **collapsingToolbarLayout** (com.google.android.material.appbar.CollapsingToolbarLayout) - The CollapsingToolbarLayout instance. - **toolbar** (androidx.appcompat.widget.Toolbar) - The Toolbar to be associated with the CollapsingToolbarLayout. - **navController** (androidx.navigation.NavController) - The NavController managing the app's navigation. - **drawerLayout** (androidx.drawerlayout.widget.DrawerLayout?) - Optional DrawerLayout to integrate with the navigation. ### Request Example ```kotlin val collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar) val toolbar = findViewById(R.id.toolbar) val navController = findNavController(R.id.nav_host_fragment) val drawerLayout = findViewById(R.id.drawer_layout) collapsingToolbarLayout.setupWithNavController(toolbar, navController, drawerLayout) ``` ### Response N/A (This function updates UI elements and sets up listeners) ``` -------------------------------- ### Toolbar Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.4.0-beta03.txt Sets up a Toolbar to display the Up button and navigate when clicked. ```APIDOC ## POST /setupWithNavController (Toolbar) ### Description Sets up a Toolbar to display the Up button and navigate when clicked. ### Method POST ### Endpoint /setupWithNavController ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **toolbar** (androidx.appcompat.widget.Toolbar) - Required - The Toolbar to set up. - **navController** (androidx.navigation.NavController) - Required - The NavController to use for navigation. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - The DrawerLayout or similar layout to associate with the Toolbar for Up button behavior. - **configuration** (androidx.navigation.ui.AppBarConfiguration) - Optional - Configuration for the AppBar. - **collapsingToolbarLayout** (com.google.android.material.appbar.CollapsingToolbarLayout) - Optional - The CollapsingToolbarLayout to associate with the Toolbar. ### Request Example ```json { "toolbar": "Toolbar object", "navController": "NavController object", "openableLayout": "Openable object", "configuration": "AppBarConfiguration object", "collapsingToolbarLayout": "CollapsingToolbarLayout object" } ``` ### Response #### Success Response (200) Void #### Response Example (No response body for void methods) ``` -------------------------------- ### WorkInfo Get State Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/work/work-runtime/api/2.0.0.txt Gets the current state of the work. ```APIDOC ## WorkInfo Get State ### Description Gets the current state of the work. ### Method `androidx.work.WorkInfo.State getState()` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response - **State** (androidx.work.WorkInfo.State) - The current state of the work (e.g., ENQUEUED, RUNNING, SUCCEEDED, FAILED, CANCELLED, BLOCKED). ``` -------------------------------- ### WorkInfo Get ID Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/work/work-runtime/api/2.0.0.txt Gets the unique ID of the WorkInfo. ```APIDOC ## WorkInfo Get ID ### Description Gets the unique ID of the WorkInfo. ### Method `java.util.UUID getId()` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response - **UUID** (java.util.UUID) - The unique ID of the work. ``` -------------------------------- ### Navigation UI Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.7.0-beta02.txt Provides methods to set up navigation controllers with different UI components, including AppBars, Toolbars, and NavigationBars. ```APIDOC ## Navigation UI Setup Methods ### Description These methods facilitate the integration of `NavController` with various Android UI components to manage navigation within your application. ### Methods #### `setupActionBarWithNavController` ##### Description Sets up the `ActionBar` or `Toolbar` to display the correct navigation icons and titles based on the current destination in the `NavController`. ##### Parameters - `activity` (AppCompatActivity) - The activity hosting the `NavController`. - `navController` (NavController) - The `NavController` to associate with the `ActionBar`. - `configuration` (AppBarConfiguration, optional) - Configuration for the `AppBar`. - `openableLayout` (Openable?, optional) - The `Openable` layout (e.g., `DrawerLayout`) to manage the navigation icon. #### `setupWithNavController` ##### Description Connects a `NavController` with various UI components like `Toolbar`, `CollapsingToolbarLayout`, `NavigationBarView`, and `NavigationView` to synchronize navigation state with UI interactions. ##### Parameters - `toolbar` (Toolbar) - The `Toolbar` to set up. - `navController` (NavController) - The `NavController` to associate with the `Toolbar`. - `configuration` (AppBarConfiguration, optional) - Configuration for the `AppBar`. - `openableLayout` (Openable?, optional) - The `Openable` layout (e.g., `DrawerLayout`) to manage the navigation icon. - `collapsingToolbarLayout` (CollapsingToolbarLayout) - The `CollapsingToolbarLayout` to set up. - `navigationBarView` (NavigationBarView) - The `NavigationBarView` (e.g., `BottomNavigationView`) to set up. - `navigationView` (NavigationView) - The `NavigationView` (e.g., `DrawerLayout`'s NavigationView) to set up. - `saveState` (boolean, optional) - Whether to save and restore the navigation state. #### `navigateUp` ##### Description Navigates the `NavController` up one level in the navigation hierarchy. ##### Parameters - `navController` (NavController) - The `NavController` to navigate up. - `configuration` (AppBarConfiguration) - The `AppBarConfiguration` to use for determining the up behavior. #### `onNavDestinationSelected` ##### Description Handles the selection of a navigation destination, typically from a menu item. ##### Parameters - `item` (MenuItem) - The menu item that was selected. - `navController` (NavController) - The `NavController` to navigate to the selected destination. - `saveState` (boolean, optional) - Whether to save the state of the destination. ### Example Usage (Conceptual) ```kotlin // Setting up ActionBar with NavController setupActionBarWithNavController(activity, navController) // Setting up Toolbar with NavController and DrawerLayout setupWithNavController(toolbar, navController, drawerLayout) // Handling menu item selection for navigation onNavDestinationSelected(menuItem, navController) ``` ``` -------------------------------- ### setupWithNavController Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui-ktx/api/2.1.0-beta01.txt Integrates various UI components with a NavController for automatic navigation handling. ```APIDOC ## setupWithNavController ### Description Connects UI components like BottomNavigationView, NavigationView, Toolbar, or CollapsingToolbarLayout to a NavController. ### Parameters - **view** (View) - Required - The UI component (BottomNavigationView, NavigationView, Toolbar, or CollapsingToolbarLayout). - **navController** (NavController) - Required - The navigation controller to link. - **toolbar** (Toolbar) - Required (for CollapsingToolbarLayout) - The toolbar to associate. - **drawerLayout** (DrawerLayout?) - Optional - The drawer layout to manage. - **configuration** (AppBarConfiguration) - Optional - Configuration for the app bar. ``` -------------------------------- ### Start Service Action Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/glance/glance-appwidget/api/restricted_1.1.0-beta01.txt Creates an action to start a service. ```APIDOC ## actionStartService ### Description Creates an action that starts a service. ### Method `static Action actionStartService(ComponentName componentName, boolean isForegroundService)` `static Action actionStartService(Intent intent, boolean isForegroundService)` `static inline Action actionStartService(boolean isForegroundService)` `static Action actionStartService(Class service, boolean isForegroundService)` ### Endpoint N/A (Utility Function) ### Parameters N/A (Function overloads) ### Request Example N/A ### Response Returns an `Action` object. #### Success Response (200) N/A #### Response Example N/A **Parameters:** - **componentName** (ComponentName) - The component name of the service. - **intent** (Intent) - The Intent to start the service. - **service** (Class) - The class of the service. - **isForegroundService** (boolean) - Optional - Whether the service is a foreground service. ``` -------------------------------- ### Start Service Action Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/glance/glance-appwidget/api/1.2.0-beta01.txt Defines an action that starts a service. ```APIDOC ## StartServiceAction ### Description Creates an action that starts a service, with an option to specify if it is a foreground service. ### Parameters - **service/intent/componentName** (Class/Intent/ComponentName) - Required - The service to start. - **isForegroundService** (boolean) - Optional - Whether the service should be started as a foreground service. ``` -------------------------------- ### isStartupFeatureSupported Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/webkit/webkit/api/1.8.0-beta01.txt Checks if a specific startup feature is supported by the WebView implementation in the given context. ```APIDOC ## isStartupFeatureSupported ### Description Checks if a specific startup feature is supported by the WebView implementation in the given context. ### Parameters #### Path Parameters - **context** (android.content.Context) - Required - The application context. - **feature** (String) - Required - The feature constant to check (e.g., STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX). ### Response #### Success Response (200) - **result** (boolean) - Returns true if the feature is supported, false otherwise. ``` -------------------------------- ### Dynamic Install Monitor Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-dynamic-features-runtime/api/restricted_2.8.0-beta02.txt Monitors the status of dynamic feature installations. ```APIDOC ## DynamicInstallMonitor ### Description Monitors the status of dynamic feature installations. ### Constructor ``` ctor public DynamicInstallMonitor(); ``` ### Methods - `cancelInstall()`: Cancels an ongoing installation. - `getException()`: Returns any exception that occurred during installation. - `getSessionId()`: Returns the session ID of the installation. - `getStatus()`: Returns a LiveData object with the installation session state. - `isInstallRequired()`: Checks if an installation is required. ### Properties - `exception` (Exception?): The exception that occurred during installation. - `isInstallRequired` (boolean): Indicates if an installation is required. - `sessionId` (int): The session ID of the installation. - `status` (LiveData): The current status of the installation. ``` -------------------------------- ### ActionBar Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.4.0-beta02.txt Sets up the ActionBar to display the Up button and handle navigation. ```APIDOC ## POST /setupActionBarWithNavController ### Description Sets up the ActionBar to display the Up button and handle navigation actions. This is useful for enabling the standard back/up navigation within your Activity. ### Method POST ### Endpoint /setupActionBarWithNavController ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **activity** (androidx.appcompat.app.AppCompatActivity) - Required - The AppCompatActivity instance. - **navController** (androidx.navigation.NavController) - Required - The NavController to link with the ActionBar. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - A layout that can be opened or closed, typically a DrawerLayout, to manage the Up button behavior with the drawer. - **configuration** (androidx.navigation.ui.AppBarConfiguration?) - Optional - Configuration for the AppBar, allowing customization of the Up button behavior and top-level destinations. ### Request Example ```json { "activity": "activity_instance", "navController": "nav_controller_instance", "openableLayout": "drawer_layout_instance", "configuration": { "topLevelDestinations": ["destination_id_1", "destination_id_2"] } } ``` ### Response #### Success Response (200) This method does not return a value; it performs an action. #### Response Example N/A ``` -------------------------------- ### Dynamic Install Monitor Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-dynamic-features-runtime/api/2.8.0-beta03.txt Monitors the status of dynamic feature installations. ```APIDOC ## DynamicInstallMonitor ### Description Provides methods to monitor the progress and status of dynamic feature installations. ### Constructor ```kotlin ctor public DynamicInstallMonitor(); ``` ### Methods - `cancelInstall()`: Cancels an ongoing installation. - `getException()`: Returns any exception that occurred during installation. - `getSessionId()`: Returns the session ID of the installation. - `getStatus()`: Returns a LiveData object with the current installation session state. - `isInstallRequired()`: Checks if an installation is required. ### Properties - `exception` (Exception?): The exception that occurred during installation. - `isInstallRequired` (boolean): Indicates if an installation is required. - `sessionId` (int): The session ID of the installation. - `status` (LiveData): The current installation session state. ``` -------------------------------- ### isStartupFeatureSupported Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/webkit/webkit/api/restricted_1.8.0-beta01.txt Checks whether a specific startup feature is supported by the WebView implementation. ```APIDOC ## isStartupFeatureSupported ### Description Checks if a given feature is supported by the WebView in the provided context. ### Parameters #### Path Parameters - **context** (android.content.Context) - Required - The application context. - **feature** (String) - Required - The name of the feature to check (e.g., "STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"). ### Response #### Success Response (200) - **result** (boolean) - Returns true if the feature is supported, false otherwise. ``` -------------------------------- ### WorkInfo Get Tags Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/work/work-runtime/api/2.0.0.txt Gets the set of tags associated with the work. ```APIDOC ## WorkInfo Get Tags ### Description Gets the set of tags associated with the work. ### Method `java.util.Set getTags()` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response - **Set** (java.util.Set) - A set of tags associated with the work. ``` -------------------------------- ### ActionBar Setup Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/2.4.0-beta03.txt Sets up the ActionBar to display the Up button and navigate when clicked. ```APIDOC ## POST /setupActionBarWithNavController ### Description Sets up the ActionBar to display the Up button and navigate when clicked. ### Method POST ### Endpoint /setupActionBarWithNavController ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **activity** (androidx.appcompat.app.AppCompatActivity) - Required - The AppCompatActivity to set up the ActionBar for. - **navController** (androidx.navigation.NavController) - Required - The NavController to use for navigation. - **openableLayout** (androidx.customview.widget.Openable?) - Optional - The DrawerLayout or similar layout to associate with the ActionBar for Up button behavior. - **configuration** (androidx.navigation.ui.AppBarConfiguration) - Optional - Configuration for the AppBar. ### Request Example ```json { "activity": "AppCompatActivity object", "navController": "NavController object", "openableLayout": "Openable object", "configuration": "AppBarConfiguration object" } ``` ### Response #### Success Response (200) Void #### Response Example (No response body for void methods) ``` -------------------------------- ### Start Safe Browsing Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/webkit/webkit/api/1.6.0-beta01.txt Starts the safe browsing feature for the WebView. ```APIDOC ## POST /webview/safeBrowsing/start ### Description Starts the safe browsing feature for the WebView. ### Method POST ### Endpoint /webview/safeBrowsing/start ### Parameters #### Query Parameters - **context** (android.content.Context) - Required - The application context. - **callback** (android.webkit.ValueCallback?) - Optional - A callback to be invoked with the result. ### Request Example { "context": "applicationContext", "callback": "valueCallbackInstance" } ### Response #### Success Response (200) - **status** (string) - Indicates success or failure. #### Response Example { "status": "success" } ``` -------------------------------- ### setupWithNavController (CollapsingToolbarLayout) Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui/api/current.txt Links a CollapsingToolbarLayout to a NavController and Toolbar. ```APIDOC ## setupWithNavController ### Description Configures a CollapsingToolbarLayout to work with a NavController and a Toolbar. ### Parameters - **collapsingToolbarLayout** (CollapsingToolbarLayout) - Required - The layout to configure. - **toolbar** (Toolbar) - Required - The toolbar to associate. - **navController** (NavController) - Required - The controller managing navigation. - **drawerLayout** (DrawerLayout?) - Optional - The drawer layout to manage the navigation icon. ``` -------------------------------- ### setupWithNavController Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/navigation/navigation-ui-ktx/api/1.0.0-rc01.txt Connects various UI components like BottomNavigationView, NavigationView, Toolbar, and CollapsingToolbarLayout to a NavController. ```APIDOC ## setupWithNavController ### Description Binds UI components to the NavController so that menu item selections or toolbar interactions trigger navigation events. ### Supported Components - **BottomNavigationView** - **NavigationView** - **Toolbar** - **CollapsingToolbarLayout** ### Parameters - **view** (View) - Required - The UI component to bind. - **navController** (NavController) - Required - The controller to link with the view. - **toolbar** (Toolbar) - Required (for CollapsingToolbarLayout) - The toolbar associated with the layout. - **drawerLayout** (DrawerLayout?) - Optional - Drawer layout for navigation icon management. - **configuration** (AppBarConfiguration) - Optional - Configuration for top-level destinations. ``` -------------------------------- ### Start Service Action Source: https://github.com/jetbrains/compose-multiplatform-core/blob/jb-main/glance/glance-appwidget/api/current.txt Functions for creating actions that start a service. ```APIDOC ## actionStartService Functions ### Description Functions for creating actions that start a service. ### Methods - `actionStartService(componentName: ComponentName, isForegroundService: Boolean = false): Action` - Creates an action to start a service using its ComponentName, with an option to specify if it's a foreground service. - `actionStartService(intent: Intent, isForegroundService: Boolean = false): Action` - Creates an action to start a service using an Intent, with an option to specify if it's a foreground service. - `actionStartService(isForegroundService: Boolean = false): Action` - Creates an action to start a service specified by a reified type parameter, with an option to specify if it's a foreground service. - `actionStartService(service: Class, isForegroundService: Boolean = false): Action` - Creates an action to start a service specified by its Class object, with an option to specify if it's a foreground service. ```