Advertisement
t0mm13b

Blah

Dec 9th, 2011
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. private float getDegreesForRotation(int value) {
  2. if (System.getProperty("ro.sf.hwrotation","0").equals("180){
  3. switch(value){
  4. case Surface.ROTATION_90:
  5. return 360f - 90f;
  6. case Surface.ROTATION_180:
  7. return 0f;
  8. case Surface.ROTATION_270:
  9. return 360f - 270f;
  10. }
  11. return 360f - 180f;
  12. }
  13. }else{
  14. switch(value){
  15. case Surface.ROTATION_90:
  16. return 360f - 90f;
  17. case Surface.ROTATION_180:
  18. return 360f - 180f;
  19. case Surface.ROTATION_270:
  20. return 360f - 270f;
  21. }
  22. }
  23. return 0f;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement