Skip to content

sebkur/rotate-layout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotate Layout

Custom layout that can rotate it's view

Example

Usage

  1. Add to you project as Android library
  2. In your layout file add
<com.github.rongi.rotate_layout.layout.RotateLayout
	app="http://schemas.android.com/apk/res-auto"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content" >

	<YourLayoutHere
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		app:layout_angle="90">	<!-- Specify rotate angle here -->
	</YourLayoutHere>
</com.github.rongi.rotate_layout.layout.RotateLayout>

Voila! Your layout will be rotated 90 degrees.

Features

  1. Handles all touch events in correct way. You press the same button you touch!
  2. Layout measures itself in a correct way. This means that if original view is 50x100, then 90 degree rotated it will measure itself as 100x50 and can fit in another layouts with this dimensions.
  3. Supports only multiple of 90 angles atm. Still can be easily modifyed to support any angle.

About

Android layout that can rotate any view.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%