Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create drawable rotate 180 degree

Is possible to create a button or textview inside of xml LinearLayout rotated 180 degrees?

I tried the animation but the drawable return to 0 degree after the first circle of animation. How might I address this issue?

like image 924
Antonio Avatar asked Aug 19 '13 14:08

Antonio


People also ask

How to rotate a matrix by 180 degrees?

Rotate a Matrix by 180 degree. Given a square matrix the task is that we turn it by 180 degrees in anti-clockwise direction without using any extra space. Examples : From the above illustration we get that simply to rotate the matrix by 180 degree then we will have to print given matrix in reverse manner .

What is a 180 degree rotation in art?

The 180-degree rotation is a transformation that returns a flipped version of the point or figures horizontally. When rotated with respect to a reference point (it’s normally the origin for rotations n the xy-plane), the angle formed between the pre-image and image is equal to 180 degrees.

How to rotate videos 180 degrees on Windows?

Part 1. Rotate Videos 180 Degrees on Windows/Mac Vidmore Video Converter is a versatile desktop app that offers innovative features for editing videos. It gives you the capability to rotate, crop, flip, add watermark as well as filters to the video.

How to rotate table by 180 degrees with kutools for Excel?

Rotate table by 180 degrees with Kutools for Excel 1 Select the table you want to use, click Kutools > Range > Flip Horizontal Range > All or Only flip values. See... 2 Click Kutools > Range > Flip Vertical Range > All or Only flip values. See screenshot: More ...


2 Answers

we can create a drawable that is rotated of any number of degree like this..create a drawable file like this..

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_launcher2"
android:fromDegrees="180"
android:toDegrees="180"
android:visible="true" />

define this file in the any drawable folder

if this file name is rotate then..

In button android:background="@drawable/rotate"

like image 179
kalyan pvs Avatar answered Sep 22 '22 00:09

kalyan pvs


you could also set the android:scaleY="-1" in the xml for your button. That would flip the whole view 180 degrees by the Y or change it to scale X to "mirror" it for example. Not a rotation but would flip it 180 degrees for sure.

like image 30
jimbob Avatar answered Sep 22 '22 00:09

jimbob