material-components-android

Seekbar where I can change both min max value with 2 thumbs

≡放荡痞女 提交于 2020-11-29 09:11:00
问题 I want to have a thumb for both min and max for my seekbar. You should be able to drag both thumbs independently. 回答1: Just use the RangeSlider in Material Components and the method setValues() <com.google.android.material.slider.RangeSlider android:id="@+id/slider" android:valueFrom="0" android:valueTo="10" ../> with: RangeSlider slider = findViewById(R.id.slider); slider.setValues(1.0f,5.0f); You can also use: <com.google.android.material.slider.RangeSlider android:id="@+id/slider" android

How to apply shapeAppreanace in EditText and TextView using Material Design in Android

时光怂恿深爱的人放手 提交于 2020-11-29 08:46:53
问题 I want to design a TextView and EditText with round corner. There is one straight forward solution for this. Using custom shape background. But since material design 1.1.0 introduces shapeAppearance theme attribute to apply a different shape to the corner which works fine for all Material components like MaterialButton , BottomSheet , MaterialCardView , etc. But it does not work for EditText and TextView . I tried using MaterialTextView as well but it did not work. This how I am setting up

How to apply shapeAppreanace in EditText and TextView using Material Design in Android

二次信任 提交于 2020-11-29 08:46:04
问题 I want to design a TextView and EditText with round corner. There is one straight forward solution for this. Using custom shape background. But since material design 1.1.0 introduces shapeAppearance theme attribute to apply a different shape to the corner which works fine for all Material components like MaterialButton , BottomSheet , MaterialCardView , etc. But it does not work for EditText and TextView . I tried using MaterialTextView as well but it did not work. This how I am setting up