简体   繁体   中英

Rotate text and icons of an android app

My question is how can I modify this code (the selected method):

https://github.com/dudeofawesome/CardboardHome/blob/master/app/src/main/java/dudeofawesome/cardboardhome/Launcher.java#L721

so the text (name of the app like in the photo and icons) are rotated

Thanks a lot!

在此输入图像描述

Try the method Canvas.drawTextOnPath , with a path that goes along the line you want but from right to left, instead of left to right, which would draw the text as you have it already. The picture doesn't show any rotation, so it's unclear what you want your end result to look like.

Or try this.

Disclaimer: I only used it once to make curved text by specifying two paths, separate for the top and bottom. It may also be more of what you want:

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM