This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Home
walkingice edited this page May 31, 2012
·
6 revisions
This project tries to provide a demo of widget AnimationLayout since I saw a question from StackOverflow. The widget, AnimationLayout, works like Facebook Android app, it placed a sliding sidebar in left side.
if you use command line to build android app
$ git clone git://github.com/walkingice/gui-sliding-sidebar.git
$ cd gui-sliding-sidebar
$ android update project -p .
$ ant debug install
- Add ids.xml to res/values directory of your repository
- Add AnimationLayout.java to your repository
- update statment "import org.zeroxlab.demo.R;" of AnimationLayout.java according to your namespace. (i.e. import my.app.R;)
- apply AnimationLayout to your layout xml
- define view @id/animation_layout_sidebar and @id/animatino_layout_content
<?xml version="1.0" encoding="utf-8"?>
<org.zeroxlab.widget.AnimationLayout
xmlns:android="http://schemas.android.com/apk/res/android">
<MySidebarView android:id="@id/animation_layout_sidebar ">
....
</MySidebarView>
<MyContentView android:id="@id/animation_layout_content">
....
</MyContentView>
</org.zeroxlab.widget.AnimationLayout>
You could use these functions to control AnimationLayout
- public boolean isOpening
- public void openSidebar
- public void closeSidebar
- public void toggleSidebar: open sidebar if it is closing. close sidebar if it is opening.
- public void setListener
and you can implement AnimationLayout.Listener to monitor status of Sidebar