My implementation allows developers to import this pattern into their apps with nearly no work at all. I handle all laying out of the main and menu views, as well as the animations. Developers can design the menu and main layout completely separate in their own xml definition files, as if they were stand alone layouts (which they are!). You can also specify just how far out you want the menu to slide. If you want it to slide all the way, it can slide all the way. If you want it to slide just enough for icons, go ahead! My implementation gives you complete freedom to make your layouts look how you want.
Some features include:
- Open and Closing Animations on the Main View
- Small Open and Closing Animations on the menu to add some reality to it
- Dropshadow on the Main View to make it appear to be over the menu
- Smooth animation transitions for a professional, quality animation
- Empty layouts that allow you to completely design the menu
- Simple usage
- Easy injection into your existing projects
Using this library is simple. First, download the project from github (see link below). Then, import that into your Eclipse workspace. Once done, select the project you want to use this in, right click->properties. Go to the android tab and scroll down to add-library. This library should appear in that list. Select it and you're set up, ready to go.
To use the FanView class in xml is simple. Here are the two required things (plus me showing you how to set how big the menu should be!):
<?xml version="1.0" encoding="utf-8"?>
<com.deaux.fan.FanView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/your.package.name"
android:id="@+id/fan_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
app:menuSize="200dp" />
And that's everything! There is a sample java file in the readme of the github project so check that out as well!
So go to github now and start using it! Here's the link!
If you find any issues please report them in github and I will get to them immeaditely! For the record, this is not meant to be used with Tablet devices. Tablets should refrain from even using a pattern like this. There are many more appropriate patterns like the Split View pattern.
Looks interesting. Does it play well with actionbarsherlock?
ReplyDeleteHello, I want to know if the the attribute app:menuSize="200dp"
ReplyDeletecan be modified by java and how to do it
thx
Hello , I also want to know the same thing whether app:menuSize="200dp" can be modified by java and how to do it
ReplyDeleteyes it can be, but the project doesn't seem to load attributes correctly. Look at my fork of this project, it implements both vertical and horizontal fanning:
Deletehttps://github.com/Gregadeaux/android-fly-in-app-navigation
In FanSample/res/layout/test_horizontal.xml you can change the app:menuSize and it will show up
i meant:
Deletehttps://github.com/StoyanD/android-fly-in-app-navigation/tree/verticalFan
Nice stuff dear. I like to read your post. indoor navigation positioning for healthcare facilities & android indoor positioning app
ReplyDelete