Skip to content

Commit

Permalink
Fixed onTouch conflict with parent view,such as ViewPager.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtugeek committed Mar 13, 2016
1 parent 8fa3a44 commit 40991fe
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 86 deletions.
6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

10 changes: 2 additions & 8 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/build.gradle
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Expand Up @@ -6,8 +6,6 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
69 changes: 0 additions & 69 deletions colorseekbar/build.gradle
@@ -1,7 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
version = "1.0.0"
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
Expand All @@ -24,70 +21,4 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
def siteUrl = 'https://github.com/rtugeek/ColorSeekBar' //
def gitUrl = 'https://github.com/rtugeek/ColorSeekBar.git' //
group = "com.rtugeek.android" // Maven Group ID for the artifact
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'A colorful SeekBar for picking color'
url siteUrl
// Set your license
licenses {
license {
name 'WTFPL'
url 'http://www.wtfpl.net/txt/copying/'
}
}
developers {
developer {
id 'rtugeek' //developer profile
name 'Fu Weicheng'
email 'rtugeek@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven" //
name = "ColorSeekBar" //Bintray project name
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["WTFPL"]
publish = true
}
}
Expand Up @@ -254,6 +254,7 @@ public boolean onTouchEvent(MotionEvent event) {
}
break;
case MotionEvent.ACTION_MOVE:
getParent().requestDisallowInterceptTouchEvent(true);
if(mMovingColorBar){
float value = (x - realLeft) / mBarWidth * mMaxValue;
mColorBarValue =(int)value ;
Expand Down

0 comments on commit 40991fe

Please sign in to comment.