I want to use a SeekBar in my android app. My minsdk version is must be 23.
The compiler said setMin of SeekBar needs at least API level 26.
Do I need some special support library for a simple SeekBar setMin?
I use Android Studio 3.0.1 on Linux. My build.gradle is like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.zamek.boyler"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
my layout snippet:
<SeekBar
android:id="@+id/sb_hysteresis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"/>
my Activity code snippets:
import android.widget.SeekBar;
...
private SeekBar hysteresis;
...
this.hysteresis = findViewById(R.id.sb_hysteresis);
this.hysteresis.setMin(10); <--Compiler said:Call requires API level 26 (current min is 23): android.widget.AbsSeekBar#setMin
thx,
Zamek