File tree 1 file changed +11
-1
lines changed
app/src/main/java/fr/free/nrw/commons/upload
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -667,8 +667,18 @@ private void handleNullMedia() {
667
667
finish ();
668
668
}
669
669
670
+ /**
671
+ * Rotates the button and shows or hides the content based on the given state. Typically used
672
+ * for collapsing or expanding {@link CardView} animation.
673
+ *
674
+ * @param state the expanded state of the View whose elements are to be updated. True if
675
+ * expanded.
676
+ * @param button the image to rotate. Typically an arrow points up when the CardView is
677
+ * collapsed and down when it is expanded.
678
+ * @param content the Views that should be shown or hidden based on the state.
679
+ */
670
680
private void updateCardState (boolean state , ImageView button , View ... content ) {
671
- button .animate ().rotation (button . getRotation () + ( state ? 180 : - 180 ) ).start ();
681
+ button .animate ().rotation (state ? 180 : 0 ).start ();
672
682
if (content != null ) {
673
683
for (View view : content ) {
674
684
view .setVisibility (state ? View .VISIBLE : View .GONE );
You can’t perform that action at this time.
0 commit comments