Reputation: 1353
I know how to set a background for a radio group and custom image for radio button. My question is, how would I create a range slider like this one used in the Uber app that changes the image of the radio button for each position as well as invokes a specified function/action when in that position automatically? For example, if the user stops on the second position, which would be sort by a>z, it would automatically sort the list a>z.
Upvotes: 2
Views: 1102
Reputation: 3224
Your radio group returns a result when the user selects an option right? a number or a user defined value?
Use an OnClickListener
or OnChangeListener
to analyse the result, then run it through a switch statement that performs the relevant task.
Upvotes: 1