0

when i try to change the color of a seekbar via ...Tint, it tells me that this is only available from API 21 up.

My question is: Will devices under API 21 show the SeekBar in the color defined under "colorAccent" or is there some single standart color that is used in those cases? If yes, if i change the color by applying a alternative style which has my desired color as "colorAccent", will it work on devices under API 21?

Florian Walther
  • 6,237
  • 5
  • 46
  • 104

1 Answers1

1

Will devices under API 21 show the SeekBar in the color defined under "colorAccent" or is there some single standart color that is used in those cases?

Yes , if you Activity extends AppCompatActivity and if your theme have as parent a AppCompat theme , they handle the version support.

If yes, if i change the color by applying a alternative style which has my desired color as "colorAccent", will it work on devices under API 21

This is the way to do, create a custom style for your seekbar and apply it. You can test it with the emulator in android studio.

Hope this helps.

Cochi
  • 2,199
  • 2
  • 12
  • 15
  • Thank you. Do you now how i can find similar "replacements" for other elements, for example EditText Background (The Line) and ButtonColor (ColorButtonNormal is not working – Florian Walther Aug 20 '17 at 12:31
  • You are welcome :) What do you mean by the Line ? For button state color if `colorButtonNormal` doesn't work you can use a selector , for example https://stackoverflow.com/questions/8147824/how-do-i-set-a-different-color-for-the-pressed-state-of-the-button – Cochi Aug 20 '17 at 13:55