, gdy aktualizuję bibliotekę wsparcia dla Androida z 23.0.1 do 23.1.0, uważam, że SeekBar nie jest już pełną szerokością.System Android SeekBar nie może mieć pełnej szerokości, a nawet ustawić 0 w AppCompat 23.1.0
jest to plik XML Test:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/space_divider"
android:orientation="vertical"
android:padding="8dp"
android:showDividers="middle">
<View
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="@android:color/black"/>
<!-- default SeekBar -->
<SeekBar
android:layout_width="match_parent"
android:layout_height="10dp"
android:progress="50"
android:progressTint="@android:color/holo_red_dark"/>
<!-- padding=0 -->
<SeekBar
android:layout_width="match_parent"
android:layout_height="10dp"
android:padding="0dp"
android:progress="50"
android:progressTint="@android:color/holo_red_dark"/>
<!-- padding=40 -->
<SeekBar
android:layout_width="match_parent"
android:layout_height="10dp"
android:padding="40dp"
android:progress="50"
android:progressTint="@android:color/holo_red_dark"/>
<android.support.v7.widget.AppCompatSeekBar
android:layout_width="match_parent"
android:layout_height="10dp"
android:padding="0dp"
android:progress="50"/>
</LinearLayout>
To działa dobrze w ramach wsparcia lib 23.0.1, jak następujący zrzut ekranu. SeekBar ma domyślne wypełnienie, gdy ustawiam padding = 0 manual, może to być pełna szerokość. a AppCompatSeekBar jeszcze nie istnieje.
ale w ramach wsparcia lib 23.1.0, czy ustawić ile z wyściółką, SeekBar i AppCompatSeekBar nie ma żadnych zmian, jak następujący zrzut ekranu.
tak, to czy jest to bug wsparcia lib, każdy podmiot spotkać ten problem i jak go rozwiązać?
dziękuję ~!
zmiana:
To całkowicie mylić mnie, ja po prostu kolejny test, tworzę nowy projekt, czy używam AppCompat 23.0.1 lub 23.1.0, SeekBar nie może być pełna szerokość po zbiorze wyściółką = 0, (wartość compileSdkVersion to 23, wersja buildToolsVersion to "23.0.1", a wartość targetSdkVersion to 23). tak czy inaczej, chcę wiedzieć, jak zrobić SeekBar pełnej szerokości, gdy zestaw padding = 0 nie działa.
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.test.seekbar"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
}
ohh .. Guy !! Próbowałem już android: padding = "0dp" w stylu i widoku xml i to nie pomogło. Dziękujemy! –
Działa, ale czy wie, co się właściwie dzieje i dlaczego tak się dzieje? – NioX5199
Nie możemy uzyskać równości skuteczności, ustawiając dopełnienie w XML? –