Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:36:20+00:00 2026-06-06T03:36:20+00:00

Is it possible to rotate views in XML with APIs previous to Honeycomb –

  • 0

Is it possible to rotate views in XML with APIs previous to Honeycomb – maybe with the support package? Or is the only way to create a custom class, like described here Vertical (rotated) label in Android

Edit: What I need is a statically rotated view (specifically a TextView, but I guess it’s enough to know how to do it with a View). Starting with honeycomb there’s a rotation attribute which can be used in XML. I need something like that.

The only thing I have found until now is use an animation with duration 0 but this still moves a bit at start and I don’t want that. I tried setting the views invisible and attaching a listener to the animation which makes them visible on animation finished callback, but that made strange results… that changed the position of the views, for some reason.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:36:23+00:00Added an answer on June 6, 2026 at 3:36 am

    The best way is with the custom subclass implementation that you linked to, where you can rotate the canvas and resize the view appropriately. This ensures that the view bounds are also set to match the text that is drawn.

    The only method of transforming views externally prior to HC is the animation framework, and applying an Animation to the view with a duration of 0 and fillAfter set to true will work, but you may notice flickering on some devices as often the view will render normally on its first frame and then animated to its final position from that point onward. You can work around this by hiding the view and displaying it a bit late…but you can see how hacks are starting to stack up.

    In addition, doing an Animation prior to HC will not transform the view bounds themselves, so you won’t be able to neatly pack other views around this one because its position from a layout perspective will still be the rectangle calculated for the horizontal (non-rotated) text.

    The simple subclass is definitely the preferred method.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is this possible in xml at design time to rotate a button -90 degree
Is it possible to rotate text by 90° (clockwise or counter-clockwise) using only CSS
Is it possible to auto-rotate the default application image according to current landscape mode?
Possible Duplicate: how to rotate the given string to left or right in C?
I was wondering if it is possible to create a flash movie that rotates
Possible Duplicate: Best way to stop SQL Injection in PHP I am creating a
Is it possible to rotate a view using a UIPanGestureRecognizer? I would like similar
Is it possible to rotate an image continuously (as in a loading gif) using
Is it actually possible to rotate a T-SQL (2005) so that (for the sake
Is it possible to rotate a table 30 degrees (and other degrees also) in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.