#DropViewNotification
In-app notification library to control custom notification view to display inside the layout with animated transition.
This library is made to act as a boilerplate code to allow in-app notification to display in the content area.
DropViewNotification consists of two main classes, DropViewActivity and DropViewController. DropViewActivity extends ActionBarSherlock's SherlockFragmentActivity by default to utilize Nineoldandroids library to enable Animator support on pre-ICS devices. DropViewActivity handle view wrapping for both content and view to be used as DropView.
DropViewController controls the transition for both content and the DropView if desired.
To use DropViewNotification you must do all of the following: Your Activity needs to extends DropViewActivity: public class DefaultSampleActivity extends DropViewActivity Set DropView to display on top of the screen setTopView(my_drop_view); DropView can be shown or dismissed via DropViewController getDropViewController().show(DropViewController.Position.TOP); getDropViewController().dismiss(DropViewController.Position.TOP);
Default DropView showing transition. The content move down as DropView transitioning into the view.
Default DropView dismissing transition. The content move up just after DropView transitioning out of the view. AnticipateInterpolator
is added to the content to add closing effect.
DropView is essentially a View object so you can put anything as long as it's a child of View.
You can add your own animations as well using DropViewConfigurator and OnDropViewAction interface
DropViewConfigurator Allow different animation sequence via Order
method. You can choose to synchronize the animation by using Order.SYNCHRONOUS or using other options provided.
Order.SEQUENTIAL_DROPVIEW_FIRST
Order.SEQUENTIAL_DROPVIEW_LAST
- Poohdish Rattanavijai - [email protected] - Google Plus - Github