how to set landscape orientation in particular activity?

Viewed 8735

I am showing graph in my activity using a graphview. Now, I need to set the orientation of activity according to user's rotation. Means, if user will hold mobile horizontally, activity should set its orientation as "landscape" and same for vertical i.e. "portrait". It should not be depends on mobile settings rotation. I just want this for my graph activity only.

here is screen short you can easily understand.

enter image description here

3 Answers
Related