├── .gitignore
├── .idea
├── .gitignore
├── compiler.xml
├── deploymentTargetDropDown.xml
├── gradle.xml
├── misc.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── commandiron
│ │ └── bubblenavigationbarcompose
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── commandiron
│ │ │ └── bubblenavigationbarcompose
│ │ │ ├── MainActivity.kt
│ │ │ └── ui
│ │ │ └── theme
│ │ │ ├── Color.kt
│ │ │ ├── Shape.kt
│ │ │ ├── Theme.kt
│ │ │ └── Type.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test
│ └── java
│ └── com
│ └── commandiron
│ └── bubblenavigationbarcompose
│ └── ExampleUnitTest.kt
├── bubble-navigation-bar-compose
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── commandiron
│ │ └── bubble_navigation_bar_compose
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── commandiron
│ │ └── bubble_navigation_bar_compose
│ │ ├── BubbleNavigationBar.kt
│ │ └── BubbleNavigationBarItem.kt
│ └── test
│ └── java
│ └── com
│ └── commandiron
│ └── bubble_navigation_bar_compose
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── jitpack.yml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BubbleNavigationBarCompose [](https://jitpack.io/#commandiron/BubbleNavigationBarCompose)
2 |
3 | ## How it looks
4 |
5 |
6 |
7 | ## Setup
8 | 1. Open the file `settings.gradle` (it looks like that)
9 | ```groovy
10 | dependencyResolutionManagement {
11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
12 | repositories {
13 | google()
14 | mavenCentral()
15 | // add jitpack here 👇🏽
16 | maven { url 'https://jitpack.io' }
17 | ...
18 | }
19 | }
20 | ...
21 | ```
22 | 2. Sync the project
23 | 3. Add dependency
24 | ```groovy
25 | dependencies {
26 | implementation 'com.github.commandiron:BubbleNavigationBarCompose:1.0.2'
27 | }
28 | ```
29 |
30 | ## Usage
31 | ```kotlin
32 | BubbleNavigationBar{
33 | navigationItems.forEach { navigationItem ->
34 | BubbleNavigationBarItem(
35 | selected = currentRoute == navigationItem.route,
36 | onClick = {
37 | //Navigate
38 | },
39 | icon = navigationItem.icon,
40 | title = navigationItem.title,
41 | selectedColor = navigationItem.selectedColor
42 | )
43 | }
44 | }
45 | ```
46 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'org.jetbrains.kotlin.android'
4 | }
5 |
6 | android {
7 | compileSdk 32
8 |
9 | defaultConfig {
10 | applicationId "com.commandiron.bubblenavigationbarcompose"
11 | minSdk 23
12 | targetSdk 32
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | vectorDrawables {
18 | useSupportLibrary true
19 | }
20 | }
21 |
22 | buildTypes {
23 | release {
24 | minifyEnabled false
25 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
26 | }
27 | }
28 | compileOptions {
29 | sourceCompatibility JavaVersion.VERSION_1_8
30 | targetCompatibility JavaVersion.VERSION_1_8
31 | }
32 | kotlinOptions {
33 | jvmTarget = '1.8'
34 | }
35 | buildFeatures {
36 | compose true
37 | }
38 | composeOptions {
39 | kotlinCompilerExtensionVersion compose_version
40 | }
41 | packagingOptions {
42 | resources {
43 | excludes += '/META-INF/{AL2.0,LGPL2.1}'
44 | }
45 | }
46 | }
47 |
48 | dependencies {
49 |
50 | implementation 'androidx.core:core-ktx:1.7.0'
51 | implementation "androidx.compose.ui:ui:$compose_version"
52 | implementation "androidx.compose.material3:material3:1.0.0-alpha13"
53 | implementation "androidx.navigation:navigation-compose:2.5.0-rc01"
54 | implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
55 | implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
56 | implementation 'androidx.activity:activity-compose:1.3.1'
57 | testImplementation 'junit:junit:4.13.2'
58 | androidTestImplementation 'androidx.test.ext:junit:1.1.3'
59 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
60 | androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
61 | debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
62 | debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
63 |
64 | implementation project(':bubble-navigation-bar-compose')
65 | implementation "org.jetbrains.kotlin:kotlin-reflect:1.6.21"
66 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/commandiron/bubblenavigationbarcompose/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.commandiron.bubblenavigationbarcompose", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
16 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/commandiron/bubblenavigationbarcompose/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose
2 |
3 | import android.annotation.SuppressLint
4 | import android.os.Bundle
5 | import androidx.activity.ComponentActivity
6 | import androidx.activity.compose.setContent
7 | import androidx.compose.foundation.background
8 | import androidx.compose.foundation.layout.Box
9 | import androidx.compose.foundation.layout.fillMaxSize
10 | import androidx.compose.material.icons.Icons
11 | import androidx.compose.material.icons.filled.Home
12 | import androidx.compose.material.icons.filled.Search
13 | import androidx.compose.material.icons.filled.Settings
14 | import androidx.compose.material.icons.filled.ShoppingCart
15 | import androidx.compose.material3.*
16 | import androidx.compose.runtime.Composable
17 | import androidx.compose.runtime.getValue
18 | import androidx.compose.ui.Alignment
19 | import androidx.compose.ui.Modifier
20 | import androidx.compose.ui.graphics.Color
21 | import androidx.compose.ui.graphics.vector.ImageVector
22 | import androidx.navigation.compose.NavHost
23 | import androidx.navigation.compose.composable
24 | import androidx.navigation.compose.currentBackStackEntryAsState
25 | import androidx.navigation.compose.rememberNavController
26 | import com.commandiron.bubble_navigation_bar_compose.BubbleNavigationBar
27 | import com.commandiron.bubble_navigation_bar_compose.BubbleNavigationBarItem
28 | import com.commandiron.bubblenavigationbarcompose.ui.theme.BubbleNavigationBarComposeTheme
29 |
30 | sealed class NavigationItem(
31 | val title: String,
32 | val route: String,
33 | val icon: ImageVector,
34 | val selectedColor: Color,
35 | ){
36 | object ScreenA : NavigationItem(
37 | title = "Home",
38 | route = "screenA",
39 | icon = Icons.Default.Home,
40 | selectedColor = Color(0xFF2a9d8f)
41 | )
42 | object ScreenB : NavigationItem(
43 | title = "Search",
44 | route = "screenB",
45 | icon = Icons.Default.Search,
46 | selectedColor = Color(0xFFe9c46a)
47 | )
48 | object ScreenC : NavigationItem(
49 | title = "Shop",
50 | route = "screenC",
51 | icon = Icons.Default.ShoppingCart,
52 | selectedColor = Color(0xFFf4a261)
53 | )
54 | object ScreenD : NavigationItem(
55 | title = "Settings",
56 | route = "screenD",
57 | icon = Icons.Default.Settings,
58 | selectedColor = Color(0xFFe76f51)
59 | )
60 | }
61 |
62 | class MainActivity : ComponentActivity() {
63 | @OptIn(ExperimentalMaterial3Api::class)
64 | @SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
65 | override fun onCreate(savedInstanceState: Bundle?) {
66 | super.onCreate(savedInstanceState)
67 | setContent {
68 | BubbleNavigationBarComposeTheme {
69 | val navController = rememberNavController()
70 | val navBackStackEntry by navController.currentBackStackEntryAsState()
71 | val currentRoute = navBackStackEntry?.destination?.route
72 | val navigationItems = NavigationItem::class.nestedClasses.map {
73 | it.objectInstance as NavigationItem
74 | }
75 | Scaffold(
76 | bottomBar = {
77 | BubbleNavigationBar {
78 | navigationItems.forEach { navigationItem ->
79 | BubbleNavigationBarItem(
80 | selected = currentRoute == navigationItem.route,
81 | onClick = {
82 | if(currentRoute != navigationItem.route){
83 | navController.popBackStack()
84 | navController.navigate(navigationItem.route){
85 | navController.graph.startDestinationRoute?.let { screen_route ->
86 | popUpTo(screen_route) {
87 | saveState = true
88 | }
89 | }
90 | launchSingleTop = true
91 | restoreState = true
92 | }
93 | }
94 | },
95 | icon = navigationItem.icon,
96 | title = navigationItem.title,
97 | selectedColor = navigationItem.selectedColor
98 | )
99 | }
100 | }
101 | }
102 | ) {
103 | NavHost(navController = navController, startDestination = NavigationItem.ScreenA.route){
104 | composable(NavigationItem.ScreenA.route){
105 | ScreenA()
106 | }
107 | composable(NavigationItem.ScreenB.route){
108 | ScreenB()
109 | }
110 | composable(NavigationItem.ScreenC.route){
111 | ScreenC()
112 | }
113 | composable(NavigationItem.ScreenD.route){
114 | ScreenD()
115 | }
116 | }
117 | }
118 | }
119 | }
120 | }
121 | }
122 |
123 | @Composable
124 | fun ScreenA() {
125 | Box(
126 | modifier = Modifier
127 | .fillMaxSize()
128 | .background(NavigationItem.ScreenA.selectedColor),
129 | contentAlignment = Alignment.Center
130 | ) {
131 | Text(text = "Screen A")
132 | }
133 | }
134 | @Composable
135 | fun ScreenB() {
136 | Box(
137 | modifier = Modifier
138 | .fillMaxSize()
139 | .background(NavigationItem.ScreenB.selectedColor),
140 | contentAlignment = Alignment.Center
141 | ) {
142 | Text(text = "Screen B")
143 | }
144 | }
145 | @Composable
146 | fun ScreenC() {
147 | Box(
148 | modifier = Modifier
149 | .fillMaxSize()
150 | .background(NavigationItem.ScreenC.selectedColor),
151 | contentAlignment = Alignment.Center
152 | ) {
153 | Text(text = "Screen C")
154 | }
155 | }
156 | @Composable
157 | fun ScreenD() {
158 | Box(
159 | modifier = Modifier
160 | .fillMaxSize()
161 | .background(NavigationItem.ScreenD.selectedColor),
162 | contentAlignment = Alignment.Center
163 | ) {
164 | Text(text = "Screen D")
165 | }
166 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/commandiron/bubblenavigationbarcompose/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple200 = Color(0xFFBB86FC)
6 | val Purple500 = Color(0xFF6200EE)
7 | val Purple700 = Color(0xFF3700B3)
8 | val Teal200 = Color(0xFF03DAC5)
--------------------------------------------------------------------------------
/app/src/main/java/com/commandiron/bubblenavigationbarcompose/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose.ui.theme
2 |
3 | val Shapes = androidx.compose.material3.Shapes()
--------------------------------------------------------------------------------
/app/src/main/java/com/commandiron/bubblenavigationbarcompose/ui/theme/Theme.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose.ui.theme
2 |
3 | import androidx.compose.foundation.isSystemInDarkTheme
4 | import androidx.compose.material3.MaterialTheme
5 | import androidx.compose.material3.MaterialTheme.colorScheme
6 | import androidx.compose.material3.darkColorScheme
7 | import androidx.compose.material3.lightColorScheme
8 | import androidx.compose.runtime.Composable
9 | import androidx.compose.ui.graphics.Color
10 |
11 | private val DarkColorPalette = darkColorScheme(
12 | primary = Purple200,
13 | primaryContainer = Color.White,
14 | onPrimaryContainer = Color.Black,
15 | secondary = Teal200
16 | )
17 |
18 | private val LightColorPalette = lightColorScheme(
19 | primary = Purple500,
20 | primaryContainer = Color.White,
21 | onPrimaryContainer = Color.Black,
22 | secondary = Teal200
23 |
24 | /* Other default colors to override
25 | background = Color.White,
26 | surface = Color.White,
27 | onPrimary = Color.White,
28 | onSecondary = Color.Black,
29 | onBackground = Color.Black,
30 | onSurface = Color.Black,
31 | */
32 | )
33 |
34 | @Composable
35 | fun BubbleNavigationBarComposeTheme(
36 | darkTheme: Boolean = isSystemInDarkTheme(),
37 | content: @Composable () -> Unit
38 | ) {
39 | val colorScheme = if (darkTheme) {
40 | DarkColorPalette
41 | } else {
42 | LightColorPalette
43 | }
44 |
45 | MaterialTheme(
46 | colorScheme = colorScheme,
47 | typography = Typography,
48 | shapes = Shapes,
49 | content = content
50 | )
51 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/commandiron/bubblenavigationbarcompose/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose.ui.theme
2 |
3 | import androidx.compose.material3.Typography
4 |
5 | // Set of Material typography styles to start with
6 | val Typography = Typography()
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BubbleNavigationBarCompose
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/test/java/com/commandiron/bubblenavigationbarcompose/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubblenavigationbarcompose
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | id 'org.jetbrains.kotlin.android'
4 | id 'maven-publish'
5 | }
6 |
7 | android {
8 | compileSdk 32
9 |
10 | defaultConfig {
11 | minSdk 23
12 | targetSdk 32
13 |
14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15 | consumerProguardFiles "consumer-rules.pro"
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | compileOptions {
25 | sourceCompatibility JavaVersion.VERSION_1_8
26 | targetCompatibility JavaVersion.VERSION_1_8
27 | }
28 | kotlinOptions {
29 | jvmTarget = '1.8'
30 | }
31 | buildFeatures {
32 | compose true
33 | }
34 | composeOptions {
35 | kotlinCompilerExtensionVersion compose_version
36 | }
37 | }
38 |
39 | dependencies {
40 | implementation "androidx.compose.ui:ui:$compose_version"
41 | implementation "androidx.compose.material3:material3:1.0.0-alpha13"
42 | }
43 |
44 | afterEvaluate {
45 | publishing{
46 | publications {
47 | release(MavenPublication){
48 | from components.release
49 |
50 | groupId = 'com.github.commandiron'
51 | artifactId = 'bubble-navigation-bar-compose'
52 | version = '1.0'
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/bubble-navigation-bar-compose/consumer-rules.pro
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/src/androidTest/java/com/commandiron/bubble_navigation_bar_compose/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubble_navigation_bar_compose
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.commandiron.bubble_navigation_bar_compose.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/src/main/java/com/commandiron/bubble_navigation_bar_compose/BubbleNavigationBar.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubble_navigation_bar_compose
2 |
3 | import androidx.compose.foundation.layout.*
4 | import androidx.compose.foundation.selection.selectableGroup
5 | import androidx.compose.material3.MaterialTheme
6 | import androidx.compose.material3.Surface
7 | import androidx.compose.runtime.Composable
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.graphics.Color
10 | import androidx.compose.ui.unit.Dp
11 | import androidx.compose.ui.unit.dp
12 |
13 | @Composable
14 | fun BubbleNavigationBar(
15 | modifier: Modifier = Modifier,
16 | navigationHeight: Dp = 64.dp,
17 | containerColor: Color = MaterialTheme.colorScheme.primaryContainer,
18 | contentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
19 | content: @Composable RowScope.() -> Unit
20 | ) {
21 | Surface(
22 | color = containerColor,
23 | contentColor = contentColor,
24 | modifier = modifier
25 | ) {
26 | Row(
27 | modifier = Modifier
28 | .fillMaxWidth()
29 | .defaultMinSize(minHeight = 24.dp)
30 | .heightIn(max = 96.dp)
31 | .height(navigationHeight)
32 | .padding(horizontal = Dp(navigationHeight / (navigationHeight / 16)))
33 | .selectableGroup(),
34 | horizontalArrangement = Arrangement.SpaceBetween,
35 | content = content
36 | )
37 | }
38 | }
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/src/main/java/com/commandiron/bubble_navigation_bar_compose/BubbleNavigationBarItem.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubble_navigation_bar_compose
2 |
3 | import androidx.annotation.DrawableRes
4 | import androidx.compose.animation.AnimatedVisibility
5 | import androidx.compose.foundation.clickable
6 | import androidx.compose.foundation.interaction.MutableInteractionSource
7 | import androidx.compose.foundation.layout.*
8 | import androidx.compose.foundation.shape.RoundedCornerShape
9 | import androidx.compose.material3.Icon
10 | import androidx.compose.material3.MaterialTheme
11 | import androidx.compose.material3.Surface
12 | import androidx.compose.material3.Text
13 | import androidx.compose.runtime.Composable
14 | import androidx.compose.runtime.remember
15 | import androidx.compose.ui.Alignment
16 | import androidx.compose.ui.Modifier
17 | import androidx.compose.ui.graphics.Color
18 | import androidx.compose.ui.graphics.painter.Painter
19 | import androidx.compose.ui.graphics.vector.ImageVector
20 | import androidx.compose.ui.graphics.vector.rememberVectorPainter
21 | import androidx.compose.ui.res.painterResource
22 | import androidx.compose.ui.text.style.TextOverflow
23 |
24 | @Composable
25 | fun RowScope.BubbleNavigationBarItem(
26 | modifier: Modifier = Modifier,
27 | selected: Boolean,
28 | onClick: () -> Unit,
29 | @DrawableRes icon: Int,
30 | selectedColor: Color,
31 | unSelectedBackgroundColor: Color = MaterialTheme.colorScheme.primaryContainer,
32 | unSelectedIconColor: Color = MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.1f),
33 | title: String
34 | ) = BubbleNavigationBarItem(
35 | modifier,
36 | selected,
37 | onClick,
38 | painterResource(icon),
39 | selectedColor,
40 | unSelectedBackgroundColor,
41 | unSelectedIconColor,
42 | title,
43 | )
44 |
45 | @Composable
46 | fun RowScope.BubbleNavigationBarItem(
47 | modifier: Modifier = Modifier,
48 | selected: Boolean,
49 | onClick: () -> Unit,
50 | icon: ImageVector,
51 | selectedColor: Color,
52 | unSelectedBackgroundColor: Color = MaterialTheme.colorScheme.primaryContainer,
53 | unSelectedIconColor: Color = MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.1f),
54 | title: String
55 | ) = BubbleNavigationBarItem(
56 | modifier,
57 | selected,
58 | onClick,
59 | rememberVectorPainter(icon),
60 | selectedColor,
61 | unSelectedBackgroundColor,
62 | unSelectedIconColor,
63 | title,
64 | )
65 |
66 | @Composable
67 | fun RowScope.BubbleNavigationBarItem(
68 | modifier: Modifier = Modifier,
69 | selected: Boolean,
70 | onClick: () -> Unit,
71 | iconPainter: Painter,
72 | selectedColor: Color,
73 | unSelectedBackgroundColor: Color = MaterialTheme.colorScheme.primaryContainer,
74 | unSelectedIconColor: Color = MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.1f),
75 | title: String
76 | ) {
77 | val interactionSource = remember { MutableInteractionSource() }
78 | BoxWithConstraints(
79 | modifier = modifier
80 | .fillMaxHeight()
81 | .clickable(
82 | interactionSource = interactionSource,
83 | indication = null
84 | ) { onClick() },
85 | contentAlignment = Alignment.Center
86 | ) {
87 | val navigationHeight = maxHeight
88 | Surface(
89 | color = if(selected) selectedColor.copy(alpha = 0.2f) else unSelectedBackgroundColor,
90 | shape = RoundedCornerShape(navigationHeight / 2)
91 | ) {
92 | Row(
93 | modifier = Modifier
94 | .padding(
95 | vertical = navigationHeight / 12,
96 | horizontal = navigationHeight / 4
97 | ),
98 | horizontalArrangement = Arrangement.Center,
99 | verticalAlignment = Alignment.CenterVertically
100 | ) {
101 | Icon(
102 | modifier = Modifier.height(navigationHeight / 2),
103 | painter = iconPainter,
104 | contentDescription = null,
105 | tint = if(selected) selectedColor else unSelectedIconColor
106 | )
107 | AnimatedVisibility(
108 | visible = selected
109 | ) {
110 | Spacer(modifier = Modifier.width(navigationHeight / 24))
111 | Text(
112 | text = title,
113 | color = selectedColor,
114 | style = MaterialTheme.typography.bodyMedium,
115 | maxLines = 1,
116 | softWrap = false,
117 | overflow = TextOverflow.Clip
118 | )
119 | }
120 | }
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/bubble-navigation-bar-compose/src/test/java/com/commandiron/bubble_navigation_bar_compose/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.commandiron.bubble_navigation_bar_compose
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_version = '1.1.1'
4 | }
5 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
6 | plugins {
7 | id 'com.android.application' version '7.2.1' apply false
8 | id 'com.android.library' version '7.2.1' apply false
9 | id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
10 | }
11 |
12 | task clean(type: Delete) {
13 | delete rootProject.buildDir
14 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/commandiron/BubbleNavigationBarCompose/b93d3752e0ad14eb0212ea654fa2ec3277b60fae/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jul 10 03:33:37 TRT 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or 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 UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/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 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/jitpack.yml:
--------------------------------------------------------------------------------
1 | jdk:
2 | - openjdk 11
3 | before install:
4 | - ./scripts/prepareJitpackEnvironment.sh
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "BubbleNavigationBarCompose"
16 | include ':app'
17 | include ':bubble-navigation-bar-compose'
18 |
--------------------------------------------------------------------------------