Skip to content

Commit de99d44

Browse files
move slider and gesture dependencies to jitpack
1 parent c7e9006 commit de99d44

File tree

28 files changed

+20
-1622
lines changed

28 files changed

+20
-1622
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Jetpack Compose Color Picker
1+
### Jetpack Compose Color Picker Bundle
22

33
Bundle of Stylish customizable Color pickers, selectors, colorful sliders written with Jetpack
44
Compose enables users to choose from HSL, HSV or RGB color models to pick Solid colors or gradients.
@@ -208,10 +208,4 @@ data class BrushColor(
208208
- [x] Add gradient color selection with percentage stops, linear, radial and sweep options
209209
- [x] Add gradient selection demo
210210

211-
### TODOs:
212-
213-
- [ ] Add and display colors selected previously
214-
- [ ] Add option to select colors from Image
215-
- [ ] Add option to select colors from Screen
216-
- [ ] Add option to select colors from Camera
217211

app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,22 @@ android {
4848
dependencies {
4949

5050
implementation project(':colorpicker')
51-
implementation project(':slider')
51+
implementation 'com.github.SmartToolFactory:Compose-Colorful-Sliders:1.0.0'
5252

5353
implementation 'androidx.core:core-ktx:1.7.0'
5454
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
5555
implementation 'androidx.activity:activity-compose:1.4.0'
5656

57+
// Jetpack Compose
5758
implementation "androidx.compose.ui:ui:$compose_version"
5859
implementation "androidx.compose.material:material:$compose_version"
5960
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
6061

61-
implementation 'com.google.accompanist:accompanist-systemuicontroller:0.24.3-alpha'
62-
implementation "com.google.accompanist:accompanist-pager:0.24.3-alpha"
63-
implementation "com.google.accompanist:accompanist-pager-indicators:0.24.3-alpha"
62+
def accompanist_version = "0.24.6-alpha"
63+
// Accompanist
64+
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
65+
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
66+
implementation "com.google.accompanist:accompanist-drawablepainter:$accompanist_version"
6467

6568
testImplementation 'junit:junit:4.13.2'
6669
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

app/src/main/java/com/smarttoolfactory/composecolorpicker/MainActivity.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.compose.animation.ExperimentalAnimationApi
7-
import androidx.compose.foundation.layout.Column
8-
import androidx.compose.foundation.layout.fillMaxSize
7+
import androidx.compose.foundation.Canvas
8+
import androidx.compose.foundation.layout.*
99
import androidx.compose.material.*
1010
import androidx.compose.runtime.Composable
1111
import androidx.compose.runtime.rememberCoroutineScope
1212
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.geometry.Rect
1314
import androidx.compose.ui.graphics.Color
15+
import androidx.compose.ui.graphics.Path
16+
import androidx.compose.ui.graphics.drawscope.Stroke
1417
import androidx.compose.ui.unit.dp
1518
import com.google.accompanist.pager.*
1619
import com.smarttoolfactory.composecolorpicker.demo.*
@@ -52,11 +55,7 @@ private fun HomeContent() {
5255
// Our selected tab is our current page
5356
selectedTabIndex = pagerState.currentPage,
5457
// Override the indicator, using the provided pagerTabIndicatorOffset modifier
55-
indicator = { tabPositions ->
56-
TabRowDefaults.Indicator(
57-
Modifier.pagerTabIndicatorOffset(pagerState, tabPositions)
58-
)
59-
}
58+
indicator = {}
6059
) {
6160
// Add tabs for all of our pages
6261
tabList.forEachIndexed { index, title ->

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
3-
compose_version = '1.2.0-alpha06'
3+
compose_version = '1.2.0-alpha07'
44
}
55
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
66
plugins {
7-
id 'com.android.application' version '7.1.2' apply false
8-
id 'com.android.library' version '7.1.2' apply false
7+
id 'com.android.application' version '7.1.3' apply false
8+
id 'com.android.library' version '7.1.3' apply false
99
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
1010
}
1111

colorpicker/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ android {
4343

4444
dependencies {
4545

46-
// TODO Upload these libraries to Maven
47-
implementation project(':slider')
48-
implementation project(':gesture')
46+
implementation 'com.github.SmartToolFactory:Compose-Colorful-Sliders:1.0.0'
47+
implementation 'com.github.SmartToolFactory:Compose-Extended-Gestures:1.0.0'
4948

5049
implementation 'androidx.core:core-ktx:1.7.0'
5150
implementation 'androidx.appcompat:appcompat:1.4.1'

gesture/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

gesture/build.gradle

Lines changed: 0 additions & 61 deletions
This file was deleted.

gesture/consumer-rules.pro

Whitespace-only changes.

gesture/proguard-rules.pro

Lines changed: 0 additions & 21 deletions
This file was deleted.

gesture/src/androidTest/java/com/smarttoolfactory/gesture/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)