├── composeApp
├── src
│ ├── iosMain
│ │ └── kotlin
│ │ │ ├── network
│ │ │ └── chaintech
│ │ │ │ └── cmptooltipdemo
│ │ │ │ ├── App.ios.kt
│ │ │ │ └── theme
│ │ │ │ └── Theme.ios.kt
│ │ │ └── main.kt
│ ├── commonMain
│ │ ├── composeResources
│ │ │ ├── drawable
│ │ │ │ ├── temp1.png
│ │ │ │ ├── temp2.png
│ │ │ │ ├── temp3.png
│ │ │ │ ├── temp4.png
│ │ │ │ ├── ic_message_alert.png
│ │ │ │ ├── ic_dark_mode.xml
│ │ │ │ ├── ic_top_right_arrow.xml
│ │ │ │ ├── ic_profile.xml
│ │ │ │ ├── ic_home.xml
│ │ │ │ ├── ic_rotate_right.xml
│ │ │ │ ├── ic_default.xml
│ │ │ │ ├── ic_custom_button.xml
│ │ │ │ ├── ic_custom_image.xml
│ │ │ │ ├── ic_cyclone.xml
│ │ │ │ ├── ic_light_mode.xml
│ │ │ │ ├── ic_button.xml
│ │ │ │ ├── ic_menu.xml
│ │ │ │ ├── ic_custom_content.xml
│ │ │ │ └── ic_comment.xml
│ │ │ ├── font
│ │ │ │ └── IndieFlower-Regular.ttf
│ │ │ └── values
│ │ │ │ └── strings.xml
│ │ └── kotlin
│ │ │ └── network
│ │ │ └── chaintech
│ │ │ └── cmptooltipdemo
│ │ │ ├── theme
│ │ │ ├── Color.kt
│ │ │ └── Theme.kt
│ │ │ └── App.kt
│ ├── androidMain
│ │ ├── kotlin
│ │ │ └── network
│ │ │ │ └── chaintech
│ │ │ │ └── cmptooltipdemo
│ │ │ │ ├── theme
│ │ │ │ └── Theme.android.kt
│ │ │ │ └── App.android.kt
│ │ └── AndroidManifest.xml
│ └── commonTest
│ │ └── kotlin
│ │ └── network
│ │ └── chaintech
│ │ └── cmptooltipdemo
│ │ └── ComposeTest.kt
├── build
│ └── kotlin-multiplatform-resources
│ │ ├── aggregated-resources
│ │ ├── iosArm64
│ │ │ └── composeResources
│ │ │ │ └── cmptooltipdemo.composeapp.generated.resources
│ │ │ │ ├── values
│ │ │ │ └── strings.commonMain.cvr
│ │ │ │ ├── drawable
│ │ │ │ ├── temp1.png
│ │ │ │ ├── temp2.png
│ │ │ │ ├── temp3.png
│ │ │ │ ├── temp4.png
│ │ │ │ ├── ic_message_alert.png
│ │ │ │ ├── ic_dark_mode.xml
│ │ │ │ ├── ic_top_right_arrow.xml
│ │ │ │ ├── ic_profile.xml
│ │ │ │ ├── ic_home.xml
│ │ │ │ ├── ic_rotate_right.xml
│ │ │ │ ├── ic_default.xml
│ │ │ │ ├── ic_custom_button.xml
│ │ │ │ ├── ic_custom_image.xml
│ │ │ │ ├── ic_cyclone.xml
│ │ │ │ ├── ic_light_mode.xml
│ │ │ │ ├── ic_button.xml
│ │ │ │ ├── ic_menu.xml
│ │ │ │ ├── ic_custom_content.xml
│ │ │ │ └── ic_comment.xml
│ │ │ │ └── font
│ │ │ │ └── IndieFlower-Regular.ttf
│ │ ├── iosX64
│ │ │ └── composeResources
│ │ │ │ └── cmptooltipdemo.composeapp.generated.resources
│ │ │ │ ├── values
│ │ │ │ └── strings.commonMain.cvr
│ │ │ │ ├── drawable
│ │ │ │ ├── temp1.png
│ │ │ │ ├── temp2.png
│ │ │ │ ├── temp3.png
│ │ │ │ ├── temp4.png
│ │ │ │ ├── ic_message_alert.png
│ │ │ │ ├── ic_dark_mode.xml
│ │ │ │ ├── ic_top_right_arrow.xml
│ │ │ │ ├── ic_profile.xml
│ │ │ │ ├── ic_home.xml
│ │ │ │ ├── ic_rotate_right.xml
│ │ │ │ ├── ic_default.xml
│ │ │ │ ├── ic_custom_button.xml
│ │ │ │ ├── ic_custom_image.xml
│ │ │ │ ├── ic_cyclone.xml
│ │ │ │ ├── ic_light_mode.xml
│ │ │ │ ├── ic_button.xml
│ │ │ │ ├── ic_menu.xml
│ │ │ │ ├── ic_custom_content.xml
│ │ │ │ └── ic_comment.xml
│ │ │ │ └── font
│ │ │ │ └── IndieFlower-Regular.ttf
│ │ └── iosSimulatorArm64
│ │ │ └── composeResources
│ │ │ └── cmptooltipdemo.composeapp.generated.resources
│ │ │ ├── values
│ │ │ └── strings.commonMain.cvr
│ │ │ ├── drawable
│ │ │ ├── temp1.png
│ │ │ ├── temp2.png
│ │ │ ├── temp3.png
│ │ │ ├── temp4.png
│ │ │ ├── ic_message_alert.png
│ │ │ ├── ic_dark_mode.xml
│ │ │ ├── ic_top_right_arrow.xml
│ │ │ ├── ic_profile.xml
│ │ │ ├── ic_home.xml
│ │ │ ├── ic_rotate_right.xml
│ │ │ ├── ic_default.xml
│ │ │ ├── ic_custom_button.xml
│ │ │ ├── ic_custom_image.xml
│ │ │ ├── ic_cyclone.xml
│ │ │ ├── ic_light_mode.xml
│ │ │ ├── ic_button.xml
│ │ │ ├── ic_menu.xml
│ │ │ ├── ic_custom_content.xml
│ │ │ └── ic_comment.xml
│ │ │ └── font
│ │ │ └── IndieFlower-Regular.ttf
│ │ └── assemble-hierarchically
│ │ └── androidDebugResources
│ │ └── composeResources
│ │ └── cmptooltipdemo.composeapp.generated.resources
│ │ ├── values
│ │ └── strings.commonMain.cvr
│ │ └── drawable
│ │ ├── temp1.png
│ │ ├── temp2.png
│ │ ├── temp3.png
│ │ ├── temp4.png
│ │ ├── ic_message_alert.png
│ │ ├── ic_dark_mode.xml
│ │ ├── ic_top_right_arrow.xml
│ │ ├── ic_profile.xml
│ │ ├── ic_home.xml
│ │ ├── ic_rotate_right.xml
│ │ ├── ic_default.xml
│ │ ├── ic_custom_button.xml
│ │ ├── ic_custom_image.xml
│ │ ├── ic_cyclone.xml
│ │ ├── ic_light_mode.xml
│ │ ├── ic_button.xml
│ │ ├── ic_menu.xml
│ │ ├── ic_custom_content.xml
│ │ └── ic_comment.xml
└── build.gradle.kts
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── libs.versions.toml
├── iosApp
├── iosApp
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── iosApp.swift
└── iosApp.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── bcsn-savanv.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ ├── xcuserdata
│ └── bcsn-savanv.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.pbxproj
├── local.properties
├── gradle.properties
├── settings.gradle.kts
├── gradlew.bat
├── README.md
└── gradlew
/composeApp/src/iosMain/kotlin/network/chaintech/cmptooltipdemo/App.ios.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/temp1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/drawable/temp1.png
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/temp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/drawable/temp2.png
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/temp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/drawable/temp3.png
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/temp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/drawable/temp4.png
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/font/IndieFlower-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/font/IndieFlower-Regular.ttf
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_message_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/src/commonMain/composeResources/drawable/ic_message_alert.png
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/composeApp/src/iosMain/kotlin/main.kt:
--------------------------------------------------------------------------------
1 | import androidx.compose.ui.window.ComposeUIViewController
2 | import network.chaintech.cmptooltipdemo.App
3 | import platform.UIKit.UIViewController
4 |
5 | fun MainViewController(): UIViewController = ComposeUIViewController { App() }
6 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/xcuserdata/bcsn-savanv.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/iosApp/iosApp.xcodeproj/project.xcworkspace/xcuserdata/bcsn-savanv.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Cyclone
3 | Open github
4 | Run
5 | Stop
6 | Theme
7 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/values/strings.commonMain.cvr:
--------------------------------------------------------------------------------
1 | version:0
2 | string|cyclone|Q3ljbG9uZQ==
3 | string|open_github|T3BlbiBnaXRodWI=
4 | string|run|UnVu
5 | string|stop|U3RvcA==
6 | string|theme|VGhlbWU=
7 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/values/strings.commonMain.cvr:
--------------------------------------------------------------------------------
1 | version:0
2 | string|cyclone|Q3ljbG9uZQ==
3 | string|open_github|T3BlbiBnaXRodWI=
4 | string|run|UnVu
5 | string|stop|U3RvcA==
6 | string|theme|VGhlbWU=
7 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/values/strings.commonMain.cvr:
--------------------------------------------------------------------------------
1 | version:0
2 | string|cyclone|Q3ljbG9uZQ==
3 | string|open_github|T3BlbiBnaXRodWI=
4 | string|run|UnVu
5 | string|stop|U3RvcA==
6 | string|theme|VGhlbWU=
7 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/values/strings.commonMain.cvr:
--------------------------------------------------------------------------------
1 | version:0
2 | string|cyclone|Q3ljbG9uZQ==
3 | string|open_github|T3BlbiBnaXRodWI=
4 | string|run|UnVu
5 | string|stop|U3RvcA==
6 | string|theme|VGhlbWU=
7 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Tue Jun 18 12:18:01 IST 2024
8 | sdk.dir=/Users/bcsn-rehant/Library/Android/sdk
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp1.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp2.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp3.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/temp4.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/font/IndieFlower-Regular.ttf
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaintech-Network/CMP_tooltip/HEAD/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_message_alert.png
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | #Gradle
2 | org.gradle.jvmargs=-Xmx4G -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx4G"
3 | org.gradle.caching=true
4 | org.gradle.configuration-cache=true
5 | org.gradle.daemon=true
6 | org.gradle.parallel=true
7 |
8 | #Kotlin
9 | kotlin.code.style=official
10 | kotlin.js.compiler=ir
11 |
12 | #Android
13 | android.useAndroidX=true
14 | android.nonTransitiveRClass=true
15 |
16 | #Compose
17 | org.jetbrains.compose.experimental.jscanvas.enabled=true
18 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/xcuserdata/bcsn-savanv.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | iosApp.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = "CMPTooltipDemo"
2 | include(":composeApp")
3 |
4 | pluginManagement {
5 | repositories {
6 | google()
7 | gradlePluginPortal()
8 | mavenCentral()
9 | }
10 | }
11 |
12 | dependencyResolutionManagement {
13 | repositories {
14 | google()
15 | mavenCentral()
16 | maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
17 | maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap")
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_dark_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_top_right_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/iosApp/iosApp/iosApp.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import ComposeApp
3 |
4 | @main
5 | class AppDelegate: UIResponder, UIApplicationDelegate {
6 | var window: UIWindow?
7 |
8 | func application(
9 | _ application: UIApplication,
10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
11 | ) -> Bool {
12 | window = UIWindow(frame: UIScreen.main.bounds)
13 | if let window = window {
14 | window.rootViewController = MainKt.MainViewController()
15 | window.makeKeyAndVisible()
16 | }
17 | return true
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_dark_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_dark_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_profile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_dark_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_dark_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_top_right_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_top_right_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_top_right_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_top_right_arrow.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/src/iosMain/kotlin/network/chaintech/cmptooltipdemo/theme/Theme.ios.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo.theme
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.runtime.LaunchedEffect
5 | import platform.UIKit.UIApplication
6 | import platform.UIKit.UIStatusBarStyleDarkContent
7 | import platform.UIKit.UIStatusBarStyleLightContent
8 | import platform.UIKit.setStatusBarStyle
9 |
10 | @Composable
11 | internal actual fun SystemAppearance(isDark: Boolean) {
12 | LaunchedEffect(isDark) {
13 | UIApplication.sharedApplication.setStatusBarStyle(
14 | if (isDark) UIStatusBarStyleDarkContent else UIStatusBarStyleLightContent
15 | )
16 | }
17 | }
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_profile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_profile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_profile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_profile.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/kotlin/network/chaintech/cmptooltipdemo/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | object ColorPalette {
6 | val textPrimary: Color = Color(0xFFA3A3A3)
7 | val textSecondary: Color = Color(0xFFC1C1C1)
8 | val textOther: Color = Color(0xFF5D5D5D)
9 | val white: Color = Color.White
10 | val black: Color = Color.Black
11 | val greenPrimary: Color = Color(0xFF8AE98D)
12 | val orangePrimary: Color = Color(0xFFFFBB4E)
13 | val bluePrimary: Color = Color(0xFF39C7FF)
14 | val backgroundPrimary: Color = Color(0xFF0E121A)
15 | val divider: Color = Color(0xFF313131)
16 | val orangeSecondary: Color = Color(0xFFF4CD5E)
17 | }
18 |
--------------------------------------------------------------------------------
/composeApp/src/androidMain/kotlin/network/chaintech/cmptooltipdemo/theme/Theme.android.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo.theme
2 |
3 | import android.app.Activity
4 | import androidx.compose.runtime.Composable
5 | import androidx.compose.runtime.LaunchedEffect
6 | import androidx.compose.ui.platform.LocalView
7 | import androidx.core.view.WindowInsetsControllerCompat
8 |
9 | @Composable
10 | internal actual fun SystemAppearance(isDark: Boolean) {
11 | val view = LocalView.current
12 | LaunchedEffect(isDark) {
13 | val window = (view.context as Activity).window
14 | WindowInsetsControllerCompat(window, window.decorView).apply {
15 | isAppearanceLightStatusBars = isDark
16 | isAppearanceLightNavigationBars = isDark
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_rotate_right.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/androidMain/kotlin/network/chaintech/cmptooltipdemo/App.android.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo
2 |
3 | import android.app.Application
4 | import android.os.Bundle
5 | import androidx.activity.ComponentActivity
6 | import androidx.activity.compose.setContent
7 | import androidx.activity.enableEdgeToEdge
8 |
9 | class AndroidApp : Application() {
10 | companion object {
11 | lateinit var INSTANCE: AndroidApp
12 | }
13 |
14 | override fun onCreate() {
15 | super.onCreate()
16 | INSTANCE = this
17 | }
18 | }
19 |
20 | class AppActivity : ComponentActivity() {
21 | override fun onCreate(savedInstanceState: Bundle?) {
22 | super.onCreate(savedInstanceState)
23 | enableEdgeToEdge()
24 | setContent { App() }
25 | }
26 | }
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_default.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_rotate_right.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_rotate_right.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_custom_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_rotate_right.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_rotate_right.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_default.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_default.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_custom_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_default.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_default.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/gradle/libs.versions.toml:
--------------------------------------------------------------------------------
1 | [versions]
2 |
3 | cmpTooltip = "1.0.0"
4 | kotlin = "2.0.0"
5 | compose = "1.6.11"
6 | agp = "8.2.2"
7 | androidx-activityCompose = "1.9.0"
8 | androidx-uiTest = "1.6.7"
9 |
10 | [libraries]
11 |
12 | androidx-activityCompose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
13 | androidx-testManifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-uiTest" }
14 | androidx-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-uiTest" }
15 | cmp-tooltip = { module = "network.chaintech:cmp-tooltip", version.ref = "cmpTooltip" }
16 |
17 | [plugins]
18 |
19 | multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
20 | compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
21 | compose = { id = "org.jetbrains.compose", version.ref = "compose" }
22 | android-application = { id = "com.android.application", version.ref = "agp" }
23 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_cyclone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_cyclone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_cyclone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_cyclone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_cyclone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_light_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_light_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_light_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_light_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_light_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/kotlin/network/chaintech/cmptooltipdemo/theme/Theme.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo.theme
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.material3.MaterialTheme
5 | import androidx.compose.material3.Surface
6 | import androidx.compose.material3.darkColorScheme
7 | import androidx.compose.material3.lightColorScheme
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.runtime.CompositionLocalProvider
10 | import androidx.compose.runtime.compositionLocalOf
11 | import androidx.compose.runtime.getValue
12 | import androidx.compose.runtime.mutableStateOf
13 | import androidx.compose.runtime.remember
14 |
15 | private val LightColorScheme = lightColorScheme(
16 | )
17 |
18 | private val DarkColorScheme = darkColorScheme(
19 | )
20 |
21 | internal val LocalThemeIsDark = compositionLocalOf { mutableStateOf(true) }
22 |
23 | @Composable
24 | internal fun AppTheme(
25 | content: @Composable() () -> Unit
26 | ) {
27 | val systemIsDark = isSystemInDarkTheme()
28 | val isDarkState = remember { mutableStateOf(systemIsDark) }
29 | CompositionLocalProvider(
30 | LocalThemeIsDark provides isDarkState
31 | ) {
32 | val isDark by isDarkState
33 | SystemAppearance(!isDark)
34 | MaterialTheme(
35 | colorScheme = if (isDark) DarkColorScheme else LightColorScheme,
36 | content = { Surface(content = content) }
37 | )
38 | }
39 | }
40 |
41 | @Composable
42 | internal expect fun SystemAppearance(isDark: Boolean)
43 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_button.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/composeApp/src/commonTest/kotlin/network/chaintech/cmptooltipdemo/ComposeTest.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo
2 |
3 | import androidx.compose.foundation.layout.Column
4 | import androidx.compose.material3.Button
5 | import androidx.compose.material3.Text
6 | import androidx.compose.runtime.getValue
7 | import androidx.compose.runtime.mutableStateOf
8 | import androidx.compose.runtime.remember
9 | import androidx.compose.runtime.setValue
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.platform.testTag
12 | import androidx.compose.ui.test.ExperimentalTestApi
13 | import androidx.compose.ui.test.assertTextEquals
14 | import androidx.compose.ui.test.onNodeWithTag
15 | import androidx.compose.ui.test.performClick
16 | import androidx.compose.ui.test.runComposeUiTest
17 | import kotlin.test.Test
18 |
19 | @OptIn(ExperimentalTestApi::class)
20 | class ComposeTest {
21 |
22 | @Test
23 | fun simpleCheck() = runComposeUiTest {
24 | setContent {
25 | var txt by remember { mutableStateOf("Go") }
26 | Column {
27 | Text(
28 | text = txt,
29 | modifier = Modifier.testTag("t_text")
30 | )
31 | Button(
32 | onClick = { txt += "." },
33 | modifier = Modifier.testTag("t_button")
34 | ) {
35 | Text("click me")
36 | }
37 | }
38 | }
39 |
40 | onNodeWithTag("t_button").apply {
41 | repeat(3) { performClick() }
42 | }
43 | onNodeWithTag("t_text").assertTextEquals("Go...")
44 | }
45 | }
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_custom_content.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/composeResources/drawable/ic_comment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_content.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_content.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_content.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_custom_content.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_comment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosX64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_comment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/aggregated-resources/iosSimulatorArm64/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_comment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/composeApp/build/kotlin-multiplatform-resources/assemble-hierarchically/androidDebugResources/composeResources/cmptooltipdemo.composeapp.generated.resources/drawable/ic_comment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo. 1>&2
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48 | echo. 1>&2
49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50 | echo location of your Java installation. 1>&2
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo. 1>&2
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62 | echo. 1>&2
63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64 | echo location of your Java installation. 1>&2
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/composeApp/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.compose.ExperimentalComposeLibrary
2 | import com.android.build.api.dsl.ManagedVirtualDevice
3 | import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
4 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget
5 | import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
6 |
7 | plugins {
8 | alias(libs.plugins.multiplatform)
9 | alias(libs.plugins.compose.compiler)
10 | alias(libs.plugins.compose)
11 | alias(libs.plugins.android.application)
12 | }
13 |
14 | kotlin {
15 | androidTarget {
16 | compilations.all {
17 | compileTaskProvider {
18 | compilerOptions {
19 | jvmTarget.set(JvmTarget.JVM_1_8)
20 | freeCompilerArgs.add("-Xjdk-release=${JavaVersion.VERSION_1_8}")
21 | }
22 | }
23 | }
24 | //https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html
25 | @OptIn(ExperimentalKotlinGradlePluginApi::class)
26 | instrumentedTestVariant {
27 | sourceSetTree.set(KotlinSourceSetTree.test)
28 | dependencies {
29 | debugImplementation(libs.androidx.testManifest)
30 | implementation(libs.androidx.junit4)
31 | }
32 | }
33 | }
34 |
35 | listOf(
36 | iosX64(),
37 | iosArm64(),
38 | iosSimulatorArm64()
39 | ).forEach {
40 | it.binaries.framework {
41 | baseName = "ComposeApp"
42 | isStatic = true
43 | binaryOption("bundleId", "network.chaintech.cmptooltipdemo")
44 | }
45 | }
46 |
47 | sourceSets {
48 | commonMain.dependencies {
49 | implementation(compose.runtime)
50 | implementation(compose.foundation)
51 | implementation(compose.material3)
52 | implementation(compose.material)
53 | implementation(compose.components.resources)
54 | implementation(compose.components.uiToolingPreview)
55 | implementation(libs.cmp.tooltip)
56 | }
57 |
58 | commonTest.dependencies {
59 | implementation(kotlin("test"))
60 | @OptIn(ExperimentalComposeLibrary::class)
61 | implementation(compose.uiTest)
62 | }
63 |
64 | androidMain.dependencies {
65 | implementation(compose.uiTooling)
66 | implementation(libs.androidx.activityCompose)
67 | }
68 |
69 | iosMain.dependencies {
70 | }
71 |
72 | }
73 | }
74 |
75 | android {
76 | namespace = "network.chaintech.cmptooltipdemo"
77 | compileSdk = 34
78 |
79 | defaultConfig {
80 | minSdk = 24
81 | targetSdk = 34
82 |
83 | applicationId = "network.chaintech.cmptooltipdemo.androidApp"
84 | versionCode = 1
85 | versionName = "1.0.0"
86 |
87 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
88 | }
89 | sourceSets["main"].apply {
90 | manifest.srcFile("src/androidMain/AndroidManifest.xml")
91 | res.srcDirs("src/androidMain/res")
92 | }
93 | //https://developer.android.com/studio/test/gradle-managed-devices
94 | @Suppress("UnstableApiUsage")
95 | testOptions {
96 | managedDevices.devices {
97 | maybeCreate("pixel5").apply {
98 | device = "Pixel 5"
99 | apiLevel = 34
100 | systemImageSource = "aosp"
101 | }
102 | }
103 | }
104 | compileOptions {
105 | sourceCompatibility = JavaVersion.VERSION_1_8
106 | targetCompatibility = JavaVersion.VERSION_1_8
107 | }
108 | buildFeatures {
109 | //enables a Compose tooling support in the AndroidStudio
110 | compose = true
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CMPTooltip
2 |
3 | A CMPTooltip is custom tooltip library for Compose Multiplatform for Android and iOS.
4 |
5 | 
6 |
7 | ## Installation
8 |
9 | 1. Add the dependency to your `build.gradle.kts` file:
10 |
11 | ```
12 | commonMain.dependencies {
13 | implementation("network.chaintech:cmp-tooltip:1.0.0")
14 | }
15 | ```
16 |
17 | 2. Define Your CMPTooltipBox Components
18 |
19 | ```kotlin
20 | var showTooltip by remember { mutableStateOf(false) }
21 | val tooltipState = rememberTooltipBoxState()
22 |
23 | CMPTooltipBox(
24 | state = tooltipState,
25 | showTooltip = showTooltip,
26 | onTooltipCompleted = {
27 | showTooltip = false
28 | }
29 | ) {
30 | // Your main UI content goes here
31 | }
32 | ```
33 |
34 | 3. Simple Tooltip:
35 |
36 | ```kotlin
37 | IconButton(
38 | onClick = { /* Handle menu icon click */ },
39 | modifier = Modifier
40 | .markForSimpleTooltip(
41 | index = 0,
42 | title = "Menu",
43 | description = "Click here to open the menu",
44 | tooltipBoxConfig = TooltipBoxConfig(
45 | backgroundColor = Color.White,
46 | // Customize other tooltip properties as needed
47 | )
48 | )
49 | ) {
50 | Icon(Icons.Filled.Menu, contentDescription = "Menu")
51 | }
52 | ```
53 |
54 | 4. Tooltip with Button
55 |
56 | ```kotlin
57 | IconButton(
58 | onClick = { /* Handle menu icon click */ },
59 | modifier = Modifier.markForButtonTooltipBox(
60 | index = 0,
61 | title = "Menu",
62 | description = "Click here to open the menu",
63 | buttonTitle = "OK",
64 | buttonClickEvent = {
65 | // Handle button click event
66 | },
67 | tooltipBoxConfig = TooltipBoxConfig(
68 | backgroundColor = Color.White,
69 | )
70 | )
71 | ) {
72 | Icon(Icons.Filled.Menu, contentDescription = "Menu")
73 | }
74 | ```
75 |
76 | 5. Tooltip with Image
77 |
78 | ```kotlin
79 | IconButton(
80 | onClick = { /* Handle menu icon click */ },
81 | modifier = Modifier.markForImageTooltipBox(
82 | index = 0,
83 | title = "Menu",
84 | description = "Click here to open the menu",
85 | imageName = R.drawable.menu_icon,
86 | tooltipBoxConfig = TooltipBoxConfig(
87 | backgroundColor = Color.White,
88 | )
89 | )
90 | ) {
91 | Icon(Icons.Filled.Menu, contentDescription = "Menu")
92 | }
93 | ```
94 |
95 | 6. Tooltip with Button and Image
96 |
97 | ```kotlin
98 | IconButton(
99 | onClick = { /* Handle menu icon click */ },
100 | modifier = Modifier.markForTooltipWithButtonAndImage(
101 | index = 0,
102 | title = "Menu",
103 | description = "Click here to open the menu",
104 | imageName = R.drawable.menu_icon,
105 | buttonTitle = "OK",
106 | buttonClickEvent = {
107 | // Handle button click event
108 | },
109 | tooltipBoxConfig = TooltipBoxConfig(
110 | backgroundColor = Color.White,
111 | )
112 | )
113 | ) {
114 | Icon(Icons.Filled.Menu, contentDescription = "Menu")
115 | }
116 | ```
117 |
118 | 7. Custom Tooltip Content
119 |
120 | ```kotlin
121 | IconButton(
122 | onClick = { /* Handle menu icon click */ },
123 | modifier = Modifier.applyCustomTooltipBox(
124 | index = 0,
125 | tooltipBoxConfig = TooltipBoxConfig(
126 | backgroundColor = Color.White,
127 | arrowDirection = TooltipBoxArrowDirection.Top,
128 | arrowHeadSize = 25f,
129 | arrowColor = Color.White,
130 | // Customize other tooltip properties as needed
131 | ),
132 | content = {
133 | Text(
134 | text = "Custom Tooltip Content",
135 | color = Color.Black,
136 | fontSize = 16.sp,
137 | fontWeight = FontWeight.Bold,
138 | textAlign = TextAlign.Center
139 | )
140 | }
141 | )
142 | ) {
143 | Icon(Icons.Filled.Menu, contentDescription = "Menu")
144 | }
145 | ```
146 |
147 | ## Screenshot
148 | 
149 |
150 |
151 | - For Demo [Checkout This Class](https://github.com/ChainTechNetwork/CMP_tooltip/blob/main/composeApp/src/commonMain/kotlin/network/chaintech/cmptooltipdemo/App.kt)
152 |
153 | - [Medium Article](https://medium.com/@manishdabhi1223_25861/15b68aa04ff4) for detailed explaination.
154 |
155 | - Connect us on [LinkedIn](https://www.linkedin.com/showcase/mobile-innovation-network)
156 |
157 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88 |
89 | # Use the maximum available, or set MAX_FD != -1 to use that value.
90 | MAX_FD=maximum
91 |
92 | warn () {
93 | echo "$*"
94 | } >&2
95 |
96 | die () {
97 | echo
98 | echo "$*"
99 | echo
100 | exit 1
101 | } >&2
102 |
103 | # OS specific support (must be 'true' or 'false').
104 | cygwin=false
105 | msys=false
106 | darwin=false
107 | nonstop=false
108 | case "$( uname )" in #(
109 | CYGWIN* ) cygwin=true ;; #(
110 | Darwin* ) darwin=true ;; #(
111 | MSYS* | MINGW* ) msys=true ;; #(
112 | NONSTOP* ) nonstop=true ;;
113 | esac
114 |
115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116 |
117 |
118 | # Determine the Java command to use to start the JVM.
119 | if [ -n "$JAVA_HOME" ] ; then
120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121 | # IBM's JDK on AIX uses strange locations for the executables
122 | JAVACMD=$JAVA_HOME/jre/sh/java
123 | else
124 | JAVACMD=$JAVA_HOME/bin/java
125 | fi
126 | if [ ! -x "$JAVACMD" ] ; then
127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128 |
129 | Please set the JAVA_HOME variable in your environment to match the
130 | location of your Java installation."
131 | fi
132 | else
133 | JAVACMD=java
134 | if ! command -v java >/dev/null 2>&1
135 | then
136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 | fi
142 |
143 | # Increase the maximum file descriptors if we can.
144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145 | case $MAX_FD in #(
146 | max*)
147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148 | # shellcheck disable=SC2039,SC3045
149 | MAX_FD=$( ulimit -H -n ) ||
150 | warn "Could not query maximum file descriptor limit"
151 | esac
152 | case $MAX_FD in #(
153 | '' | soft) :;; #(
154 | *)
155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156 | # shellcheck disable=SC2039,SC3045
157 | ulimit -n "$MAX_FD" ||
158 | warn "Could not set maximum file descriptor limit to $MAX_FD"
159 | esac
160 | fi
161 |
162 | # Collect all arguments for the java command, stacking in reverse order:
163 | # * args from the command line
164 | # * the main class name
165 | # * -classpath
166 | # * -D...appname settings
167 | # * --module-path (only if needed)
168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169 |
170 | # For Cygwin or MSYS, switch paths to Windows format before running java
171 | if "$cygwin" || "$msys" ; then
172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174 |
175 | JAVACMD=$( cygpath --unix "$JAVACMD" )
176 |
177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
178 | for arg do
179 | if
180 | case $arg in #(
181 | -*) false ;; # don't mess with options #(
182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183 | [ -e "$t" ] ;; #(
184 | *) false ;;
185 | esac
186 | then
187 | arg=$( cygpath --path --ignore --mixed "$arg" )
188 | fi
189 | # Roll the args list around exactly as many times as the number of
190 | # args, so each arg winds up back in the position where it started, but
191 | # possibly modified.
192 | #
193 | # NB: a `for` loop captures its iteration list before it begins, so
194 | # changing the positional parameters here affects neither the number of
195 | # iterations, nor the values presented in `arg`.
196 | shift # remove old arg
197 | set -- "$@" "$arg" # push replacement arg
198 | done
199 | fi
200 |
201 |
202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204 |
205 | # Collect all arguments for the java command:
206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207 | # and any embedded shellness will be escaped.
208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209 | # treated as '${Hostname}' itself on the command line.
210 |
211 | set -- \
212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
213 | -classpath "$CLASSPATH" \
214 | org.gradle.wrapper.GradleWrapperMain \
215 | "$@"
216 |
217 | # Stop when "xargs" is not available.
218 | if ! command -v xargs >/dev/null 2>&1
219 | then
220 | die "xargs is not available"
221 | fi
222 |
223 | # Use "xargs" to parse quoted args.
224 | #
225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226 | #
227 | # In Bash we could simply go:
228 | #
229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230 | # set -- "${ARGS[@]}" "$@"
231 | #
232 | # but POSIX shell has neither arrays nor command substitution, so instead we
233 | # post-process each arg (as a line of input to sed) to backslash-escape any
234 | # character that might be a shell metacharacter, then use eval to reverse
235 | # that process (while maintaining the separation between arguments), and wrap
236 | # the whole thing up as a single "set" statement.
237 | #
238 | # This will of course break if any of these variables contains a newline or
239 | # an unmatched quote.
240 | #
241 |
242 | eval "set -- $(
243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244 | xargs -n1 |
245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246 | tr '\n' ' '
247 | )" '"$@"'
248 |
249 | exec "$JAVACMD" "$@"
250 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 56;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | A93A953B29CC810C00F8E227 /* iosApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93A953A29CC810C00F8E227 /* iosApp.swift */; };
11 | A93A953F29CC810D00F8E227 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93A953E29CC810D00F8E227 /* Assets.xcassets */; };
12 | A93A954229CC810D00F8E227 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93A954129CC810D00F8E227 /* Preview Assets.xcassets */; };
13 | /* End PBXBuildFile section */
14 |
15 | /* Begin PBXFileReference section */
16 | A93A953729CC810C00F8E227 /* CMPTooltipBoxDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CMPTooltipBoxDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
17 | A93A953A29CC810C00F8E227 /* iosApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosApp.swift; sourceTree = ""; };
18 | A93A953E29CC810D00F8E227 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
19 | A93A954129CC810D00F8E227 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
20 | /* End PBXFileReference section */
21 |
22 | /* Begin PBXFrameworksBuildPhase section */
23 | A93A953429CC810C00F8E227 /* Frameworks */ = {
24 | isa = PBXFrameworksBuildPhase;
25 | buildActionMask = 2147483647;
26 | files = (
27 | );
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXFrameworksBuildPhase section */
31 |
32 | /* Begin PBXGroup section */
33 | A93A952E29CC810C00F8E227 = {
34 | isa = PBXGroup;
35 | children = (
36 | A93A953929CC810C00F8E227 /* iosApp */,
37 | A93A953829CC810C00F8E227 /* Products */,
38 | C4127409AE3703430489E7BC /* Frameworks */,
39 | );
40 | sourceTree = "";
41 | };
42 | A93A953829CC810C00F8E227 /* Products */ = {
43 | isa = PBXGroup;
44 | children = (
45 | A93A953729CC810C00F8E227 /* CMPTooltipBoxDemo.app */,
46 | );
47 | name = Products;
48 | sourceTree = "";
49 | };
50 | A93A953929CC810C00F8E227 /* iosApp */ = {
51 | isa = PBXGroup;
52 | children = (
53 | A93A953A29CC810C00F8E227 /* iosApp.swift */,
54 | A93A953E29CC810D00F8E227 /* Assets.xcassets */,
55 | A93A954029CC810D00F8E227 /* Preview Content */,
56 | );
57 | path = iosApp;
58 | sourceTree = "";
59 | };
60 | A93A954029CC810D00F8E227 /* Preview Content */ = {
61 | isa = PBXGroup;
62 | children = (
63 | A93A954129CC810D00F8E227 /* Preview Assets.xcassets */,
64 | );
65 | path = "Preview Content";
66 | sourceTree = "";
67 | };
68 | C4127409AE3703430489E7BC /* Frameworks */ = {
69 | isa = PBXGroup;
70 | children = (
71 | );
72 | name = Frameworks;
73 | sourceTree = "";
74 | };
75 | /* End PBXGroup section */
76 |
77 | /* Begin PBXNativeTarget section */
78 | A93A953629CC810C00F8E227 /* iosApp */ = {
79 | isa = PBXNativeTarget;
80 | buildConfigurationList = A93A954529CC810D00F8E227 /* Build configuration list for PBXNativeTarget "iosApp" */;
81 | buildPhases = (
82 | A9D80A052AAB5CDE006C8738 /* ShellScript */,
83 | A93A953329CC810C00F8E227 /* Sources */,
84 | A93A953429CC810C00F8E227 /* Frameworks */,
85 | A93A953529CC810C00F8E227 /* Resources */,
86 | );
87 | buildRules = (
88 | );
89 | dependencies = (
90 | );
91 | name = iosApp;
92 | productName = iosApp;
93 | productReference = A93A953729CC810C00F8E227 /* CMPTooltipBoxDemo.app */;
94 | productType = "com.apple.product-type.application";
95 | };
96 | /* End PBXNativeTarget section */
97 |
98 | /* Begin PBXProject section */
99 | A93A952F29CC810C00F8E227 /* Project object */ = {
100 | isa = PBXProject;
101 | attributes = {
102 | LastSwiftUpdateCheck = 1420;
103 | LastUpgradeCheck = 1420;
104 | TargetAttributes = {
105 | A93A953629CC810C00F8E227 = {
106 | CreatedOnToolsVersion = 14.2;
107 | };
108 | };
109 | };
110 | buildConfigurationList = A93A953229CC810C00F8E227 /* Build configuration list for PBXProject "iosApp" */;
111 | compatibilityVersion = "Xcode 14.0";
112 | developmentRegion = en;
113 | hasScannedForEncodings = 0;
114 | knownRegions = (
115 | en,
116 | Base,
117 | );
118 | mainGroup = A93A952E29CC810C00F8E227;
119 | productRefGroup = A93A953829CC810C00F8E227 /* Products */;
120 | projectDirPath = "";
121 | projectRoot = "";
122 | targets = (
123 | A93A953629CC810C00F8E227 /* iosApp */,
124 | );
125 | };
126 | /* End PBXProject section */
127 |
128 | /* Begin PBXResourcesBuildPhase section */
129 | A93A953529CC810C00F8E227 /* Resources */ = {
130 | isa = PBXResourcesBuildPhase;
131 | buildActionMask = 2147483647;
132 | files = (
133 | A93A954229CC810D00F8E227 /* Preview Assets.xcassets in Resources */,
134 | A93A953F29CC810D00F8E227 /* Assets.xcassets in Resources */,
135 | );
136 | runOnlyForDeploymentPostprocessing = 0;
137 | };
138 | /* End PBXResourcesBuildPhase section */
139 |
140 | /* Begin PBXShellScriptBuildPhase section */
141 | A9D80A052AAB5CDE006C8738 /* ShellScript */ = {
142 | isa = PBXShellScriptBuildPhase;
143 | buildActionMask = 2147483647;
144 | files = (
145 | );
146 | inputFileListPaths = (
147 | );
148 | inputPaths = (
149 | );
150 | outputFileListPaths = (
151 | );
152 | outputPaths = (
153 | );
154 | runOnlyForDeploymentPostprocessing = 0;
155 | shellPath = /bin/sh;
156 | shellScript = "cd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n";
157 | };
158 | /* End PBXShellScriptBuildPhase section */
159 |
160 | /* Begin PBXSourcesBuildPhase section */
161 | A93A953329CC810C00F8E227 /* Sources */ = {
162 | isa = PBXSourcesBuildPhase;
163 | buildActionMask = 2147483647;
164 | files = (
165 | A93A953B29CC810C00F8E227 /* iosApp.swift in Sources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXSourcesBuildPhase section */
170 |
171 | /* Begin XCBuildConfiguration section */
172 | A93A954329CC810D00F8E227 /* Debug */ = {
173 | isa = XCBuildConfiguration;
174 | buildSettings = {
175 | ALWAYS_SEARCH_USER_PATHS = NO;
176 | CLANG_ANALYZER_NONNULL = YES;
177 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
178 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
179 | CLANG_ENABLE_MODULES = YES;
180 | CLANG_ENABLE_OBJC_ARC = YES;
181 | CLANG_ENABLE_OBJC_WEAK = YES;
182 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
183 | CLANG_WARN_BOOL_CONVERSION = YES;
184 | CLANG_WARN_COMMA = YES;
185 | CLANG_WARN_CONSTANT_CONVERSION = YES;
186 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
187 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
188 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
189 | CLANG_WARN_EMPTY_BODY = YES;
190 | CLANG_WARN_ENUM_CONVERSION = YES;
191 | CLANG_WARN_INFINITE_RECURSION = YES;
192 | CLANG_WARN_INT_CONVERSION = YES;
193 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
194 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
195 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
196 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
197 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
198 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
199 | CLANG_WARN_STRICT_PROTOTYPES = YES;
200 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
201 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
202 | CLANG_WARN_UNREACHABLE_CODE = YES;
203 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
204 | COPY_PHASE_STRIP = NO;
205 | DEBUG_INFORMATION_FORMAT = dwarf;
206 | ENABLE_STRICT_OBJC_MSGSEND = YES;
207 | ENABLE_TESTABILITY = YES;
208 | GCC_C_LANGUAGE_STANDARD = gnu11;
209 | GCC_DYNAMIC_NO_PIC = NO;
210 | GCC_NO_COMMON_BLOCKS = YES;
211 | GCC_OPTIMIZATION_LEVEL = 0;
212 | GCC_PREPROCESSOR_DEFINITIONS = (
213 | "DEBUG=1",
214 | "$(inherited)",
215 | );
216 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
217 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
218 | GCC_WARN_UNDECLARED_SELECTOR = YES;
219 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
220 | GCC_WARN_UNUSED_FUNCTION = YES;
221 | GCC_WARN_UNUSED_VARIABLE = YES;
222 | IPHONEOS_DEPLOYMENT_TARGET = 16.2;
223 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
224 | MTL_FAST_MATH = YES;
225 | ONLY_ACTIVE_ARCH = YES;
226 | SDKROOT = iphoneos;
227 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
228 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
229 | };
230 | name = Debug;
231 | };
232 | A93A954429CC810D00F8E227 /* Release */ = {
233 | isa = XCBuildConfiguration;
234 | buildSettings = {
235 | ALWAYS_SEARCH_USER_PATHS = NO;
236 | CLANG_ANALYZER_NONNULL = YES;
237 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
238 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
239 | CLANG_ENABLE_MODULES = YES;
240 | CLANG_ENABLE_OBJC_ARC = YES;
241 | CLANG_ENABLE_OBJC_WEAK = YES;
242 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
243 | CLANG_WARN_BOOL_CONVERSION = YES;
244 | CLANG_WARN_COMMA = YES;
245 | CLANG_WARN_CONSTANT_CONVERSION = YES;
246 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
247 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
248 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
258 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
259 | CLANG_WARN_STRICT_PROTOTYPES = YES;
260 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
261 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
262 | CLANG_WARN_UNREACHABLE_CODE = YES;
263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
264 | COPY_PHASE_STRIP = NO;
265 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
266 | ENABLE_NS_ASSERTIONS = NO;
267 | ENABLE_STRICT_OBJC_MSGSEND = YES;
268 | GCC_C_LANGUAGE_STANDARD = gnu11;
269 | GCC_NO_COMMON_BLOCKS = YES;
270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
272 | GCC_WARN_UNDECLARED_SELECTOR = YES;
273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
274 | GCC_WARN_UNUSED_FUNCTION = YES;
275 | GCC_WARN_UNUSED_VARIABLE = YES;
276 | IPHONEOS_DEPLOYMENT_TARGET = 16.2;
277 | MTL_ENABLE_DEBUG_INFO = NO;
278 | MTL_FAST_MATH = YES;
279 | SDKROOT = iphoneos;
280 | SWIFT_COMPILATION_MODE = wholemodule;
281 | SWIFT_OPTIMIZATION_LEVEL = "-O";
282 | VALIDATE_PRODUCT = YES;
283 | };
284 | name = Release;
285 | };
286 | A93A954629CC810D00F8E227 /* Debug */ = {
287 | isa = XCBuildConfiguration;
288 | buildSettings = {
289 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
290 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
291 | CODE_SIGN_STYLE = Automatic;
292 | CURRENT_PROJECT_VERSION = 1;
293 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
294 | ENABLE_PREVIEWS = YES;
295 | GENERATE_INFOPLIST_FILE = YES;
296 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
297 | LD_RUNPATH_SEARCH_PATHS = (
298 | "$(inherited)",
299 | "@executable_path/Frameworks",
300 | );
301 | MARKETING_VERSION = 1.0;
302 | PRODUCT_BUNDLE_IDENTIFIER = network.chaintech.cmptooltipboxdemo;
303 | PRODUCT_NAME = CMPTooltipBoxDemo;
304 | SWIFT_EMIT_LOC_STRINGS = YES;
305 | SWIFT_VERSION = 5.0;
306 | TARGETED_DEVICE_FAMILY = "1,2";
307 | };
308 | name = Debug;
309 | };
310 | A93A954729CC810D00F8E227 /* Release */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
314 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
315 | CODE_SIGN_STYLE = Automatic;
316 | CURRENT_PROJECT_VERSION = 1;
317 | DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
318 | ENABLE_PREVIEWS = YES;
319 | GENERATE_INFOPLIST_FILE = YES;
320 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
321 | LD_RUNPATH_SEARCH_PATHS = (
322 | "$(inherited)",
323 | "@executable_path/Frameworks",
324 | );
325 | MARKETING_VERSION = 1.0;
326 | PRODUCT_BUNDLE_IDENTIFIER = network.chaintech.cmptooltipboxdemo;
327 | PRODUCT_NAME = CMPTooltipBoxDemo;
328 | SWIFT_EMIT_LOC_STRINGS = YES;
329 | SWIFT_VERSION = 5.0;
330 | TARGETED_DEVICE_FAMILY = "1,2";
331 | };
332 | name = Release;
333 | };
334 | /* End XCBuildConfiguration section */
335 |
336 | /* Begin XCConfigurationList section */
337 | A93A953229CC810C00F8E227 /* Build configuration list for PBXProject "iosApp" */ = {
338 | isa = XCConfigurationList;
339 | buildConfigurations = (
340 | A93A954329CC810D00F8E227 /* Debug */,
341 | A93A954429CC810D00F8E227 /* Release */,
342 | );
343 | defaultConfigurationIsVisible = 0;
344 | defaultConfigurationName = Release;
345 | };
346 | A93A954529CC810D00F8E227 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
347 | isa = XCConfigurationList;
348 | buildConfigurations = (
349 | A93A954629CC810D00F8E227 /* Debug */,
350 | A93A954729CC810D00F8E227 /* Release */,
351 | );
352 | defaultConfigurationIsVisible = 0;
353 | defaultConfigurationName = Release;
354 | };
355 | /* End XCConfigurationList section */
356 | };
357 | rootObject = A93A952F29CC810C00F8E227 /* Project object */;
358 | }
359 |
--------------------------------------------------------------------------------
/composeApp/src/commonMain/kotlin/network/chaintech/cmptooltipdemo/App.kt:
--------------------------------------------------------------------------------
1 | package network.chaintech.cmptooltipdemo
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.background
5 | import androidx.compose.foundation.border
6 | import androidx.compose.foundation.clickable
7 | import androidx.compose.foundation.interaction.MutableInteractionSource
8 | import androidx.compose.foundation.layout.Arrangement
9 | import androidx.compose.foundation.layout.Box
10 | import androidx.compose.foundation.layout.Column
11 | import androidx.compose.foundation.layout.Row
12 | import androidx.compose.foundation.layout.Spacer
13 | import androidx.compose.foundation.layout.WindowInsets
14 | import androidx.compose.foundation.layout.fillMaxSize
15 | import androidx.compose.foundation.layout.fillMaxWidth
16 | import androidx.compose.foundation.layout.height
17 | import androidx.compose.foundation.layout.padding
18 | import androidx.compose.foundation.layout.safeDrawing
19 | import androidx.compose.foundation.layout.size
20 | import androidx.compose.foundation.layout.statusBars
21 | import androidx.compose.foundation.layout.width
22 | import androidx.compose.foundation.layout.windowInsetsPadding
23 | import androidx.compose.foundation.lazy.LazyColumn
24 | import androidx.compose.foundation.shape.CircleShape
25 | import androidx.compose.foundation.shape.RoundedCornerShape
26 | import androidx.compose.material.Scaffold
27 | import androidx.compose.material.ScaffoldState
28 | import androidx.compose.material.rememberScaffoldState
29 | import androidx.compose.material3.HorizontalDivider
30 | import androidx.compose.material3.Surface
31 | import androidx.compose.material3.Text
32 | import androidx.compose.runtime.Composable
33 | import androidx.compose.runtime.LaunchedEffect
34 | import androidx.compose.runtime.getValue
35 | import androidx.compose.runtime.mutableStateOf
36 | import androidx.compose.runtime.remember
37 | import androidx.compose.runtime.setValue
38 | import androidx.compose.ui.Alignment
39 | import androidx.compose.ui.Modifier
40 | import androidx.compose.ui.draw.clip
41 | import androidx.compose.ui.graphics.Color
42 | import androidx.compose.ui.layout.ContentScale
43 | import androidx.compose.ui.text.TextStyle
44 | import androidx.compose.ui.text.font.FontWeight
45 | import androidx.compose.ui.text.style.TextAlign
46 | import androidx.compose.ui.unit.dp
47 | import androidx.compose.ui.unit.sp
48 | import cmptooltipdemo.composeapp.generated.resources.Res
49 | import cmptooltipdemo.composeapp.generated.resources.ic_button
50 | import cmptooltipdemo.composeapp.generated.resources.ic_comment
51 | import cmptooltipdemo.composeapp.generated.resources.ic_custom_button
52 | import cmptooltipdemo.composeapp.generated.resources.ic_custom_content
53 | import cmptooltipdemo.composeapp.generated.resources.ic_custom_image
54 | import cmptooltipdemo.composeapp.generated.resources.ic_default
55 | import cmptooltipdemo.composeapp.generated.resources.ic_home
56 | import cmptooltipdemo.composeapp.generated.resources.ic_menu
57 | import cmptooltipdemo.composeapp.generated.resources.ic_message_alert
58 | import cmptooltipdemo.composeapp.generated.resources.ic_profile
59 | import cmptooltipdemo.composeapp.generated.resources.ic_top_right_arrow
60 | import cmptooltipdemo.composeapp.generated.resources.temp1
61 | import cmptooltipdemo.composeapp.generated.resources.temp2
62 | import cmptooltipdemo.composeapp.generated.resources.temp3
63 | import cmptooltipdemo.composeapp.generated.resources.temp4
64 | import kotlinx.coroutines.delay
65 | import network.chaintech.cmptooltip.CMPTooltipBox
66 | import network.chaintech.cmptooltip.state.TooltipBoxArrowDirection
67 | import network.chaintech.cmptooltip.state.TooltipBoxConfig
68 | import network.chaintech.cmptooltip.state.rememberTooltipBoxState
69 | import network.chaintech.cmptooltipdemo.theme.AppTheme
70 | import network.chaintech.cmptooltipdemo.theme.ColorPalette
71 | import org.jetbrains.compose.resources.painterResource
72 |
73 |
74 | data class GridViewTooltipDataModel(
75 | var defaultTooltip: Modifier,
76 | var defaultImageTooltip: Modifier,
77 | var defaultButtonTooltip: Modifier,
78 | var customButtonTooltip: Modifier,
79 | var customImageTooltip: Modifier,
80 | var customContentTooltip: Modifier,
81 | )
82 |
83 | @Composable
84 | internal fun App() = AppTheme {
85 | Surface(
86 | modifier = Modifier
87 | .fillMaxSize(),
88 | color = ColorPalette.white
89 | ) {
90 | TooltipViewExample()
91 | }
92 | }
93 |
94 | @Composable
95 | fun TooltipViewExample() {
96 | var showTooltip by remember { mutableStateOf(false) }
97 | val tooltipState = rememberTooltipBoxState()
98 | val scaffoldState: ScaffoldState = rememberScaffoldState()
99 |
100 | LaunchedEffect(Unit) {
101 | delay(500)
102 | showTooltip = true
103 | }
104 |
105 | CMPTooltipBox(
106 | state = tooltipState,
107 | showTooltip = showTooltip,
108 | onTooltipCompleted = {
109 | showTooltip = false
110 | }
111 | ) {
112 | Box(
113 | modifier = Modifier
114 | .background(ColorPalette.backgroundPrimary)
115 | .windowInsetsPadding(WindowInsets.statusBars)
116 | ) {
117 | Scaffold(
118 | scaffoldState = scaffoldState,
119 | backgroundColor = ColorPalette.backgroundPrimary,
120 | modifier = Modifier
121 | .fillMaxSize(),
122 | topBar = { },
123 | floatingActionButton = { },
124 | bottomBar = { }
125 | ) {
126 | Box(modifier = Modifier.fillMaxSize()) {
127 | LazyColumn(
128 | modifier = Modifier
129 | .fillMaxSize(),
130 | horizontalAlignment = Alignment.CenterHorizontally
131 | ) {
132 | item {
133 | TopWelcomeView()
134 |
135 | Spacer(modifier = Modifier.height(25.dp))
136 |
137 | ButtonGridView(
138 | gridViewTooltipModifier = GridViewTooltipDataModel(
139 | defaultTooltip = Modifier
140 | .markForSimpleTooltip(
141 | index = 0,
142 | tooltipBoxConfig = TooltipBoxConfig(
143 | backgroundColor = Color.White,
144 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
145 | arrowHeadSize = 25f,
146 | arrowColor = Color.White,
147 | titleTextStyle = TextStyle(
148 | color = Color(0xFF333333),
149 | fontWeight = FontWeight.Bold,
150 | ),
151 | descriptionTextStyle = TextStyle(
152 | color = Color(0xFF8B8B8B)
153 | )
154 | ),
155 | title = "Default Tooltip",
156 | description = "This is Default Tooltip with title and description"
157 | ),
158 | defaultImageTooltip = Modifier
159 | .markForImageTooltipBox(
160 | index = 1,
161 | tooltipBoxConfig = TooltipBoxConfig(
162 | backgroundColor = Color.White,
163 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Bottom,
164 | arrowHeadSize = 25f,
165 | arrowColor = Color.White,
166 | titleTextStyle = TextStyle(
167 | color = Color(0xFF333333),
168 | fontWeight = FontWeight.Bold,
169 | ),
170 | descriptionTextStyle = TextStyle(
171 | color = Color(0xFF8B8B8B)
172 | )
173 | ),
174 | title = "Tooltip with Default Image",
175 | description = "This is Default Tooltip with title and description",
176 | imageName = Res.drawable.temp1,
177 | ),
178 | defaultButtonTooltip = Modifier
179 | .markForButtonTooltipBox(
180 | index = 2,
181 | tooltipBoxConfig = TooltipBoxConfig(
182 | backgroundColor = Color.White,
183 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
184 | arrowHeadSize = 25f,
185 | arrowColor = Color.White,
186 | titleTextStyle = TextStyle(
187 | color = Color(0xFF333333),
188 | fontWeight = FontWeight.Bold,
189 | ),
190 | descriptionTextStyle = TextStyle(
191 | color = Color(0xFF8B8B8B)
192 | )
193 | ),
194 | title = "Default Tooltip with Button",
195 | description = "This is Default Tooltip with title and description",
196 | buttonTitle = "Click Me",
197 | buttonClickEvent = {
198 |
199 | },
200 | ),
201 | customButtonTooltip = Modifier
202 | .markForButtonTooltipBox(
203 | index = 3,
204 | tooltipBoxConfig = TooltipBoxConfig(
205 | backgroundColor = Color.White,
206 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
207 | arrowHeadSize = 25f,
208 | arrowColor = Color.White,
209 | titleTextStyle = TextStyle(
210 | color = Color(0xFF333333),
211 | fontWeight = FontWeight.Bold,
212 | textAlign = TextAlign.Center
213 | ),
214 | descriptionTextStyle = TextStyle(
215 | color = Color(0xFF8B8B8B),
216 | textAlign = TextAlign.Center
217 | )
218 | ),
219 | title = "Tooltip with Custom Button",
220 | description = "This is custom button tooltip with title and description",
221 | customButtonContent = {
222 | Box(
223 | modifier = Modifier
224 | .background(
225 | shape = RoundedCornerShape(20.dp),
226 | color = Color(0xFF4579FF)
227 | )
228 | .padding(
229 | horizontal = 30.dp,
230 | vertical = 8.dp
231 | )
232 | .clickable(
233 | interactionSource = MutableInteractionSource(),
234 | indication = null
235 | ) {
236 |
237 | }
238 | ) {
239 | Text(
240 | text = "Click Me",
241 | textAlign = TextAlign.Center,
242 | fontWeight = FontWeight.Bold,
243 | fontSize = 14.sp,
244 | color = Color.White,
245 | )
246 | }
247 | }
248 | ),
249 | customImageTooltip = Modifier
250 | .markForImageTooltipBox(
251 | index = 4,
252 | tooltipBoxConfig = TooltipBoxConfig(
253 | backgroundColor = Color.White,
254 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
255 | arrowHeadSize = 25f,
256 | arrowColor = Color.White,
257 | titleTextStyle = TextStyle(
258 | color = Color(0xFF333333),
259 | fontWeight = FontWeight.Bold,
260 | textAlign = TextAlign.Center
261 | ),
262 | descriptionTextStyle = TextStyle(
263 | color = Color(0xFF8B8B8B),
264 | textAlign = TextAlign.Center
265 | )
266 | ),
267 | title = "Tooltip with Custom Image",
268 | description = "This is Custom Image tooltip with title and description",
269 | customImageContent = {
270 | Image(
271 | painter = painterResource(Res.drawable.temp2),
272 | contentDescription = Res.drawable.temp2.toString(),
273 | contentScale = ContentScale.Fit,
274 | modifier = Modifier
275 | .size(92.dp)
276 | .border(
277 | width = 2.dp,
278 | color = Color(0xFFBEEAFF),
279 | shape = CircleShape
280 | )
281 | .clip(CircleShape)
282 | )
283 | },
284 | ),
285 | customContentTooltip = Modifier
286 | .applyCustomTooltipBox(
287 | index = 5,
288 | tooltipBoxConfig = TooltipBoxConfig(
289 | backgroundColor = Color(0xFFFFF0E0),
290 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
291 | arrowHeadSize = 25f,
292 | arrowColor = Color(0xFFFFF0E0)
293 | ),
294 | content = {
295 | CustomTooltipView()
296 | },
297 | )
298 | )
299 | )
300 |
301 | Spacer(modifier = Modifier.height(25.dp))
302 |
303 | VarietiesView()
304 |
305 | Spacer(
306 | modifier = Modifier
307 | .height(105.dp)
308 | .windowInsetsPadding(WindowInsets.safeDrawing)
309 | )
310 | }
311 | }
312 |
313 | BottomNavBar(
314 | modifier = Modifier
315 | .align(alignment = Alignment.BottomCenter)
316 | .clickable {
317 | showTooltip = true
318 | },
319 | menuTooltipModifier = Modifier
320 | .markForTooltipWithButtonAndImage(
321 | index = 6,
322 | tooltipBoxConfig = TooltipBoxConfig(
323 | backgroundColor = Color.White,
324 | tooltipBoxArrowDirection = TooltipBoxArrowDirection.Top,
325 | arrowHeadSize = 25f,
326 | arrowColor = Color.White,
327 | titleTextStyle = TextStyle(
328 | color = Color(0xFF333333),
329 | fontWeight = FontWeight.Bold,
330 | textAlign = TextAlign.Center,
331 | ),
332 | descriptionTextStyle = TextStyle(
333 | color = Color(0xFF8B8B8B),
334 | textAlign = TextAlign.Center,
335 | )
336 | ),
337 | title = "Tooltip with Default Image + Button",
338 | description = "This is default Image + Button Image tooltip with title and description",
339 | imageName = Res.drawable.temp3,
340 | buttonTitle = "Click Me",
341 | buttonClickEvent = {
342 | showTooltip = false
343 | },
344 | ),
345 | )
346 | }
347 | }
348 | }
349 | }
350 | }
351 |
352 | @Composable
353 | fun TopWelcomeView() {
354 | Column(
355 | modifier = Modifier
356 | .padding(top = 48.dp)
357 | .padding(horizontal = 15.dp),
358 | horizontalAlignment = Alignment.Start
359 | ) {
360 | Text(
361 | text = "Good afternoon!",
362 | color = ColorPalette.textPrimary,
363 | fontSize = 20.sp,
364 | fontWeight = FontWeight.Normal,
365 | textAlign = TextAlign.Start,
366 | modifier = Modifier
367 | .fillMaxWidth()
368 | )
369 |
370 | Spacer(modifier = Modifier.height(15.dp))
371 |
372 | Row(
373 | modifier = Modifier
374 | .fillMaxWidth(),
375 | verticalAlignment = Alignment.CenterVertically,
376 | horizontalArrangement = Arrangement.SpaceBetween
377 | ) {
378 | Text(
379 | text = "Welcome User",
380 | color = ColorPalette.white,
381 | fontSize = 35.sp,
382 | fontWeight = FontWeight.Medium,
383 | textAlign = TextAlign.Start,
384 | modifier = Modifier
385 | )
386 |
387 | Image(
388 | painter = painterResource(Res.drawable.ic_top_right_arrow),
389 | contentDescription = Res.drawable.ic_top_right_arrow.toString(),
390 | contentScale = ContentScale.Fit,
391 | modifier = Modifier
392 | .width(30.dp)
393 | .height(23.dp)
394 | )
395 | }
396 | }
397 | }
398 |
399 | @Composable
400 | fun ButtonGridView(gridViewTooltipModifier: GridViewTooltipDataModel) {
401 | Column(
402 | modifier = Modifier
403 | .padding(horizontal = 15.dp),
404 | horizontalAlignment = Alignment.Start
405 | ) {
406 | Row(
407 | modifier = Modifier
408 | .fillMaxWidth(),
409 | verticalAlignment = Alignment.CenterVertically,
410 | horizontalArrangement = Arrangement.spacedBy(15.dp)
411 | ) {
412 | Box(
413 | modifier = gridViewTooltipModifier.defaultTooltip
414 | .background(
415 | shape = RoundedCornerShape(25.dp),
416 | color = ColorPalette.greenPrimary
417 | )
418 | .weight(0.54f)
419 |
420 | ) {
421 | Row(
422 | modifier = Modifier
423 | .padding(horizontal = 25.dp, vertical = 28.dp),
424 | verticalAlignment = Alignment.CenterVertically,
425 | horizontalArrangement = Arrangement.spacedBy(18.dp)
426 | ) {
427 | Image(
428 | painter = painterResource(Res.drawable.ic_default),
429 | contentDescription = Res.drawable.ic_default.toString(),
430 | contentScale = ContentScale.Fit,
431 | modifier = Modifier
432 | .size(38.dp)
433 | )
434 |
435 | Text(
436 | text = "Default\nTooltip",
437 | color = ColorPalette.black,
438 | fontSize = 20.sp,
439 | fontWeight = FontWeight.Bold,
440 | textAlign = TextAlign.Start,
441 | modifier = Modifier
442 | )
443 | }
444 | }
445 |
446 | Box(
447 | modifier = gridViewTooltipModifier.defaultImageTooltip
448 | .background(
449 | shape = RoundedCornerShape(25.dp),
450 | color = ColorPalette.white
451 | )
452 | .padding(horizontal = 25.dp, vertical = 28.dp)
453 | .weight(0.38f)
454 | ) {
455 | Image(
456 | painter = painterResource(Res.drawable.ic_profile),
457 | contentDescription = Res.drawable.ic_profile.toString(),
458 | contentScale = ContentScale.Fit,
459 | modifier = Modifier
460 | .size(46.dp)
461 | .align(Alignment.Center)
462 | )
463 | }
464 | }
465 |
466 | Spacer(modifier = Modifier.height(12.dp))
467 |
468 | Row(
469 | modifier = Modifier
470 | .fillMaxWidth(),
471 | verticalAlignment = Alignment.CenterVertically,
472 | horizontalArrangement = Arrangement.spacedBy(15.dp)
473 | ) {
474 | Box(
475 | modifier = gridViewTooltipModifier.defaultButtonTooltip
476 | .background(
477 | shape = RoundedCornerShape(25.dp),
478 | color = ColorPalette.white
479 | )
480 | .padding(horizontal = 25.dp, vertical = 28.dp)
481 | .weight(0.38f)
482 | ) {
483 | Image(
484 | painter = painterResource(Res.drawable.ic_button),
485 | contentDescription = Res.drawable.ic_button.toString(),
486 | contentScale = ContentScale.Fit,
487 | modifier = Modifier
488 | .size(46.dp)
489 | .align(Alignment.Center)
490 | )
491 | }
492 |
493 | Box(
494 | modifier = gridViewTooltipModifier.customButtonTooltip
495 | .background(
496 | shape = RoundedCornerShape(25.dp),
497 | color = ColorPalette.orangePrimary
498 | )
499 | .weight(0.54f)
500 | ) {
501 | Row(
502 | modifier = Modifier
503 | .padding(horizontal = 17.dp, vertical = 28.dp),
504 | verticalAlignment = Alignment.CenterVertically,
505 | horizontalArrangement = Arrangement.spacedBy(12.dp)
506 | ) {
507 | Image(
508 | painter = painterResource(Res.drawable.ic_custom_button),
509 | contentDescription = Res.drawable.ic_custom_button.toString(),
510 | contentScale = ContentScale.Fit,
511 | modifier = Modifier
512 | .width(64.dp)
513 | .height(34.dp)
514 | )
515 |
516 | Text(
517 | text = "Custom\nButton",
518 | color = ColorPalette.black,
519 | fontSize = 20.sp,
520 | fontWeight = FontWeight.Bold,
521 | textAlign = TextAlign.Start,
522 | modifier = Modifier
523 | )
524 | }
525 | }
526 | }
527 |
528 | Spacer(modifier = Modifier.height(12.dp))
529 |
530 | Row(
531 | modifier = Modifier
532 | .fillMaxWidth(),
533 | verticalAlignment = Alignment.CenterVertically,
534 | horizontalArrangement = Arrangement.spacedBy(15.dp)
535 | ) {
536 | Box(
537 | modifier = gridViewTooltipModifier.customImageTooltip
538 | .background(
539 | shape = RoundedCornerShape(25.dp),
540 | color = ColorPalette.bluePrimary
541 | )
542 | .weight(0.54f)
543 | ) {
544 | Row(
545 | modifier = Modifier
546 | .padding(horizontal = 25.dp, vertical = 28.dp),
547 | verticalAlignment = Alignment.CenterVertically,
548 | horizontalArrangement = Arrangement.spacedBy(18.dp)
549 | ) {
550 | Image(
551 | painter = painterResource(Res.drawable.ic_custom_image),
552 | contentDescription = Res.drawable.ic_custom_image.toString(),
553 | contentScale = ContentScale.Fit,
554 | modifier = Modifier
555 | .size(38.dp)
556 | )
557 |
558 | Text(
559 | text = "Custom\nImage",
560 | color = ColorPalette.black,
561 | fontSize = 20.sp,
562 | fontWeight = FontWeight.Bold,
563 | textAlign = TextAlign.Start,
564 | modifier = Modifier
565 | )
566 | }
567 | }
568 |
569 | Box(
570 | modifier = gridViewTooltipModifier.customContentTooltip
571 | .background(
572 | shape = RoundedCornerShape(25.dp),
573 | color = ColorPalette.white
574 | )
575 | .padding(horizontal = 25.dp, vertical = 28.dp)
576 | .weight(0.38f)
577 | ) {
578 | Image(
579 | painter = painterResource(Res.drawable.ic_custom_content),
580 | contentDescription = Res.drawable.ic_custom_content.toString(),
581 | contentScale = ContentScale.Fit,
582 | modifier = Modifier
583 | .size(46.dp)
584 | .align(Alignment.Center)
585 | )
586 | }
587 | }
588 | }
589 | }
590 |
591 | @Composable
592 | fun VarietiesView() {
593 | Column(
594 | modifier = Modifier
595 | .padding(horizontal = 15.dp),
596 | horizontalAlignment = Alignment.Start
597 | ) {
598 | Row(
599 | modifier = Modifier
600 | .fillMaxWidth(),
601 | verticalAlignment = Alignment.CenterVertically,
602 | horizontalArrangement = Arrangement.SpaceBetween
603 | ) {
604 | Text(
605 | text = "Tooltip Varieties",
606 | color = ColorPalette.textSecondary,
607 | fontSize = 16.sp,
608 | fontWeight = FontWeight.Normal,
609 | textAlign = TextAlign.Start,
610 | modifier = Modifier
611 | )
612 |
613 | Row(
614 | modifier = Modifier,
615 | verticalAlignment = Alignment.CenterVertically,
616 | horizontalArrangement = Arrangement.spacedBy(12.dp)
617 | ) {
618 | Text(
619 | text = "View all",
620 | color = ColorPalette.textSecondary,
621 | fontSize = 16.sp,
622 | fontWeight = FontWeight.Normal,
623 | textAlign = TextAlign.Start,
624 | modifier = Modifier
625 | )
626 |
627 | Image(
628 | painter = painterResource(Res.drawable.ic_top_right_arrow),
629 | contentDescription = Res.drawable.ic_top_right_arrow.toString(),
630 | contentScale = ContentScale.Fit,
631 | modifier = Modifier
632 | .width(19.dp)
633 | .height(15.dp)
634 | )
635 | }
636 | }
637 |
638 | Spacer(modifier = Modifier.height(25.dp))
639 |
640 | Column(
641 | modifier = Modifier,
642 | horizontalAlignment = Alignment.Start
643 | ) {
644 | Text(
645 | text = "Tooltip with Custom Button",
646 | color = ColorPalette.white,
647 | fontSize = 20.sp,
648 | fontWeight = FontWeight.Medium,
649 | textAlign = TextAlign.Start,
650 | modifier = Modifier
651 | )
652 |
653 | Spacer(modifier = Modifier.height(10.dp))
654 |
655 | Text(
656 | text = "Title, text content and a customize button",
657 | color = ColorPalette.textOther,
658 | fontSize = 16.sp,
659 | fontWeight = FontWeight.Normal,
660 | textAlign = TextAlign.Start,
661 | modifier = Modifier
662 | )
663 |
664 | Spacer(modifier = Modifier.height(14.dp))
665 |
666 | HorizontalDivider(
667 | modifier = Modifier, thickness = 1.dp,
668 | color = ColorPalette.divider
669 | )
670 | }
671 |
672 | Spacer(modifier = Modifier.height(20.dp))
673 |
674 | Column(
675 | modifier = Modifier,
676 | horizontalAlignment = Alignment.Start
677 | ) {
678 | Text(
679 | text = "Tooltip with Custom Button + Image",
680 | color = ColorPalette.white,
681 | fontSize = 20.sp,
682 | fontWeight = FontWeight.Medium,
683 | textAlign = TextAlign.Start,
684 | modifier = Modifier
685 | )
686 |
687 | Spacer(modifier = Modifier.height(10.dp))
688 |
689 | Text(
690 | text = "Title, text content and customize button + image",
691 | color = ColorPalette.textOther,
692 | fontSize = 16.sp,
693 | fontWeight = FontWeight.Normal,
694 | textAlign = TextAlign.Start,
695 | modifier = Modifier
696 | )
697 |
698 | Spacer(modifier = Modifier.height(14.dp))
699 |
700 | HorizontalDivider(
701 | modifier = Modifier, thickness = 1.dp,
702 | color = ColorPalette.divider
703 | )
704 | }
705 | }
706 | }
707 |
708 | @Composable
709 | fun BottomNavBar(modifier: Modifier = Modifier, menuTooltipModifier: Modifier) {
710 | Box(
711 | modifier = modifier
712 | .windowInsetsPadding(WindowInsets.safeDrawing)
713 | .fillMaxWidth()
714 | .padding(horizontal = 53.dp)
715 | .background(
716 | shape = RoundedCornerShape(20.dp),
717 | color = ColorPalette.white
718 | )
719 | ) {
720 | Row(
721 | modifier = Modifier
722 | .fillMaxWidth()
723 | .padding(horizontal = 27.dp, vertical = 10.dp),
724 | verticalAlignment = Alignment.CenterVertically,
725 | horizontalArrangement = Arrangement.SpaceBetween
726 | ) {
727 | Image(
728 | painter = painterResource(Res.drawable.ic_home),
729 | contentDescription = Res.drawable.ic_home.toString(),
730 | contentScale = ContentScale.Fit,
731 | modifier = Modifier
732 | .size(22.dp)
733 | )
734 |
735 | Box(
736 | modifier = menuTooltipModifier
737 | .background(
738 | shape = RoundedCornerShape(15.dp),
739 | color = ColorPalette.orangeSecondary
740 | )
741 | .padding(13.dp)
742 | ) {
743 | Image(
744 | painter = painterResource(Res.drawable.ic_menu),
745 | contentDescription = Res.drawable.ic_menu.toString(),
746 | contentScale = ContentScale.Fit,
747 | modifier = Modifier
748 | .size(22.dp)
749 | )
750 | }
751 |
752 | Image(
753 | painter = painterResource(Res.drawable.ic_comment),
754 | contentDescription = Res.drawable.ic_comment.toString(),
755 | contentScale = ContentScale.Fit,
756 | modifier = Modifier
757 | .size(22.dp)
758 | )
759 | }
760 | }
761 | }
762 |
763 |
764 | @Composable
765 | fun CustomTooltipView() {
766 | Column(
767 | modifier = Modifier
768 | .padding(horizontal = 20.dp)
769 | .background(
770 | color = Color(0xFFFFF0E0),
771 | shape = RoundedCornerShape(10.dp)
772 | )
773 | .padding(horizontal = 20.dp),
774 | horizontalAlignment = Alignment.CenterHorizontally
775 | ) {
776 | Spacer(modifier = Modifier.height(8.dp))
777 |
778 | Image(
779 | painter = painterResource(Res.drawable.temp4),
780 | contentDescription = Res.drawable.ic_message_alert.toString(),
781 | contentScale = ContentScale.Crop,
782 | modifier = Modifier
783 | .size(77.dp)
784 | .clip(CircleShape)
785 | )
786 |
787 | Spacer(modifier = Modifier.height(12.dp))
788 |
789 | Text(
790 | text = "Tooltip with Custom Content",
791 | textAlign = TextAlign.Center,
792 | fontWeight = FontWeight.Bold,
793 | fontSize = 20.sp,
794 | color = Color(0xFFC17D10),
795 | )
796 |
797 | Spacer(modifier = Modifier.height(9.dp))
798 |
799 | Text(
800 | text = "This is Default Tooltip with title and description",
801 | textAlign = TextAlign.Center,
802 | fontWeight = FontWeight.Normal,
803 | fontSize = 14.sp,
804 | color = Color(0xFF8B8B8B)
805 | )
806 |
807 | Spacer(modifier = Modifier.height(18.dp))
808 |
809 | Box(
810 | modifier = Modifier
811 | .background(
812 | shape = RoundedCornerShape(20.dp),
813 | color = Color(0xFF6CB14C)
814 | )
815 | .padding(horizontal = 30.dp, vertical = 8.dp)
816 | .clickable(
817 | interactionSource = MutableInteractionSource(),
818 | indication = null
819 | ) {
820 |
821 | }
822 | ) {
823 | Text(
824 | text = "Click Me",
825 | textAlign = TextAlign.Center,
826 | fontWeight = FontWeight.Bold,
827 | fontSize = 14.sp,
828 | color = Color.White,
829 | )
830 | }
831 |
832 | Spacer(modifier = Modifier.height(20.dp))
833 | }
834 | }
--------------------------------------------------------------------------------