app:layout_constraintBottom_toBottomOf="@ id/view"
allows me to put text at the bottom of a view like so:
But, how can I put that text to the side of a view like below?
Something like app:layout_constraintBottom_toSideOf
would be excellent.
CodePudding user response:
Using rotation
you can also use rotationX
and rotationY
Example:
android:rotation="90"
CodePudding user response:
It is very simple, You can achieve it from the below snippet:
<TextView
android:id="@ id/yAxis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/_16sdp"
android:gravity="center"
android:includeFontPadding="false"
android:padding="0dp"
android:rotation="-90"
android:text="Minutes"
android:textColor="@color/edDGrey"
android:textSize="@dimen/_10sdp" />
Image Description :