consp1racy / android-support-preference

Android Preferences according to Material design specs
Apache License 2.0
331 stars 49 forks source link

how to change step values in seekbarPreference? #106

Closed EstherZeng closed 6 years ago

EstherZeng commented 6 years ago

and I want to save summary value of seekbar is number not percentage what should I do? Thanks!

dirkam commented 6 years ago

You can try to use setSeekBarIncrement() on your SeekBarPreference. With setMin() and setMax() you can specify the range. getValue() will give you the value and you can just set the summary based on your needs. Or better yet, you can listen to changes with setOnSeekBarChangeListener() and update the summary based on the current value.

consp1racy commented 6 years ago

Hi @EstherZeng, can you describe a particular use case?

EstherZeng commented 6 years ago

@dirkam @consp1racy Thanks you guys for help! I solved this problem. May I ask you a question? How counld I change text size in preference, default text size is kind of small.

consp1racy commented 6 years ago

@EstherZeng No problem!

Please see https://github.com/consp1racy/android-support-preference/issues/109. If you have more questions, please open separate issues. Thanks!