jfeinstein10/SlidingMenu — pull request #516 by sockeqwe (2013-08-13 22:55:57+00:00)
Title: Slideable Icon (replaces actionsbar up icon) like ActionBarDrawerToggle

This adds the possibility to the replace the default up indicator with a slideable drawable. This will bring the same user experience like Google ActionBarDrawerToggle (http://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.html) implemtation.

It works with the native ActionBar as well as with ActionBarSherlock (without adding dependency to ActionBarSherlock). It's implemented by using reflections to provide a common interface for native ActionBar and ActionBarSherlock. It can be setup with both java code and xml (added example code to README).

```java
public class SlidingExample extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.attach);
// set the content view
setContentView(R.layout.content);
// configure the SlidingMenu
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);

...

// Set the ActionBarSlideIcon, that will replace the up indicator of the ActionBar
slidingMenu.setActionBarSlideIcon(new ActionBarSlideIcon(this,
R.drawable.ic_navigation_drawer,
R.string.open_content_desc,
R.string.close_content_desc);
}

}
```

The code has been documented with javadoc. The code of the SlideDrawable has been extracted from the android support library revision 18 (july 2013). ActionBarSlideIcon should also work with ActionBarCompat (not tested with every version of Android).