Rotate Layout

General

Category
Free
Tag
Layouts
License
MIT License
Min SDK
1 (Android 1.0)
Registered
Jun 4, 2015
Favorites
2
Link
https://github.com/rongi/rotate-layout
See also
un-material-tab
Swipe Layout
Proteus
AndroidVeil
Insets Dispatcher

Additional

Language
Java
Version
v3.0.0 (Feb 14, 2017)
Created
Mar 25, 2014
Updated
May 19, 2018
Owner
Dmitry Ryadnenko (rongi)
Contributor
Dmitry Ryadnenko (rongi)
1
Activity
Badge
Generate
Download
Source code
APK file

Blurb

Rotate Layout

A custom layout that can rotate it's view

Usage

In your layout file add

<com.github.rongi.rotate_layout.layout.RotateLayout
 xmlns:app="http://schemas.android.com/apk/res-auto"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 app:angle="90"> <!-- Specify rotate angle here -->

 <YourLayoutHere
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">
 </YourLayoutHere>
</com.github.rongi.rotate_layout.layout.RotateLayout>

Voila! Your layout will be rotated 90 degrees.

Download

implementation 'rongi.rotate-layout:rotate-layout:3.0.0'

Features

  1. The rotated view receives correct touch events.
  2. The bounding box is also rotated. This means that if the view was 100x50px before the rotation, then after 90 degrees rotation it will be 50x100px and can fit into another layout with this dimensions.