2

I want to rotate text view on seek bar. I set thumb in center when activity is open.

If thumb is center text view show flat but if thumb slide to left then text view rotate left and if thumb slide right then text view rotate right.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Does this answer your question? [Rotating a view in Android](https://stackoverflow.com/questions/1930963/rotating-a-view-in-android) – ali73 Jun 01 '20 at 11:18
  • @ali73 i also checked these answers before post question but these answer could not help me.. – Akash Attal Jun 01 '20 at 13:20

1 Answers1

2

You can use the following code in OnSeekChangeListener

if(progress<=50){
  textView.setRotation((-90*(50-progress))/50);
}else{
 textView.setRotation((90*(progress-50))/50);
}
Aashit Shah
  • 578
  • 3
  • 9