This is a sample project that demonstrates the use of the Compose Multiplatform UI framework with Kotlin Multiplatform (KMP), targeting Android and iOS. The application displays a pager with a progress indicator in the pages.
First Android | Second Android | Third Android |
---|---|---|
First iOS | Second iOS | Third iOS |
---|---|---|
To run this project, you'll need the following:
-
Clone this repository to your local machine.
git clone https://github.com/ibenabdallah/indicators-compose-multiplatform.git
-
Open the project in Android Studio.
-
Set up your Android and iOS device/emulator/simulator.
-
Build and run the project.
The project follows the standard Kotlin Multiplatform (KMP) structure, with the following notable files and directories:
-
composeApp
: Contains the Android project configuration.src/commonMain
: Contains the common code, including the Compose-based UI implementation.src/androidMain
: Contains the Android-specific code and specific configuration files.src/iosMain
: Contains the iOS-specific code.
-
iosApp
: Contains the iOS-specific configuration files. -
build.gradle.kts
: The main Gradle build script for the project.
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration
To build the application bundle:
- run
./gradlew :composeApp:assembleDebug
- find
.apk
file incomposeApp/build/outputs/apk/debug/composeApp-debug.apk
To run the application on iPhone device/simulator:
- Open
iosApp/iosApp.xcproject
in Xcode and run standard configuration - Or use Kotlin Multiplatform Mobile plugin for Android Studio
This project is based on the concepts and frameworks provided by Kotlin Multiplatform Mobile (KMM), Jetpack Compose, and Compose Multiplatform. Here are some resources that might be helpful in learning more about Compose Multiplatform UI and KMM
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Please ensure that your contributions adhere to the project's coding style and guidelines.
This project is licensed under the MIT License.