diff --git a/app/build.gradle b/app/build.gradle index 0c0df15..9152559 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ android { buildToolsVersion "24.0.3" defaultConfig { applicationId "com.mcxtzhang.swipecaptcha" - minSdkVersion 14 + minSdkVersion 16 targetSdkVersion 24 versionCode 1 versionName "1.0" diff --git a/app/src/main/java/com/mcxtzhang/swipecaptcha/MainActivity.java b/app/src/main/java/com/mcxtzhang/swipecaptcha/MainActivity.java index 51a8192..17d50d7 100644 --- a/app/src/main/java/com/mcxtzhang/swipecaptcha/MainActivity.java +++ b/app/src/main/java/com/mcxtzhang/swipecaptcha/MainActivity.java @@ -11,18 +11,19 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.request.animation.GlideAnimation; import com.bumptech.glide.request.target.SimpleTarget; +import com.mcxtzhang.captchalib.CannotTouchSeekBar; import com.mcxtzhang.captchalib.SwipeCaptchaView; public class MainActivity extends AppCompatActivity { SwipeCaptchaView mSwipeCaptchaView; - SeekBar mSeekBar; + CannotTouchSeekBar mSeekBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mSwipeCaptchaView = (SwipeCaptchaView) findViewById(R.id.swipeCaptchaView); - mSeekBar = (SeekBar) findViewById(R.id.dragBar); + mSeekBar = (CannotTouchSeekBar) findViewById(R.id.dragBar); findViewById(R.id.btnChange).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 5814d14..adec5bc 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -22,7 +22,7 @@ app:captchaHeight="30dp" app:captchaWidth="30dp"/> - =right){ + return false; + } + } + + + return super.dispatchTouchEvent(event); + } +}