I want to set rotation to the view through Layout Parameter by calling setLayoutParams
Here I can set margins
RelativeLayout.LayoutParams paramsForSpinnerTextView=(RelativeLayout.LayoutParams)spinnerTextView.getLayoutParams();
paramsForSpinnerTextView.setMargins(30,30,30,30);
spinnerTextView.setLayoutParams(paramsForSpinnerTextView);
Same way, Is there any way to set rotation to the layout parameter.
EDIT:
Yes, I can simply rotate the view using spinnerTextView.setRotation(-90)
but this is instantaneous and does not show any animation. My parent layout is Relativelayout with a attribute android:animateLayoutChanges="true"
until unless I change the child views attribute using setlayoutParams
animation attribute of parent will not do anything.
And I also know that I can use rotate
animation but that will not move the touch area of the view.