2016-04-18 8 views

Antwort

0

In API Level 11+ können Sie alle View über android:rotation in your layout XML oder setRotation() in Java drehen. Ob das Ihnen etwas geben wird, das Ihren Benutzern gefallen wird, kann ich nicht sagen.

+0

Vielen Dank –

+0

Nur noch eine Sache, das den Spinner drehen, aber nicht das Drop-Down-Menü ... wie würde ich es schaffe, dass ... a benutzerdefinierte Arrayadapter irgendwie? –

+0

@javipasku: Ähm ... Ich habe keine Ahnung. Es tut uns leid! – CommonsWare

0

Programmatically können Sie so etwas wie dies versuchen -

  RotateAnimation animation = new RotateAnimation(fromDegrees, toDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); 

      // Adding the time needed to rotate the image 
      animation.setDuration(250); 

      // Set the animation to stop after reaching the desired position. Without this it would return to the original state. 
      animation.setFillAfter(true); 

      //Then set the animation to your view 
      view.startAnimation(animation); 
+0

Das wird die Pixel drehen, aber der Touch-Bereich wird nicht rotieren. Daher ist 'RotateAnimation' nur für nicht interaktive Widgets geeignet. – CommonsWare