-
Notifications
You must be signed in to change notification settings - Fork 5k
Slideable Icon (replaces actionbars up icon) like ActionBarDrawerToggle does #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi, love this been looking for this functionality for ages. In case this isn't incorporated into the main library, or in the meanwhile is there a way I can implement it now? Thanks |
|
its already implemented by me ;) It don't looks like my pull request will be merge to the main project in the near feature. However you can use the code right now by simply checkout https://github.com/sockeqwe/SlidingMenu |
|
Great, will give it a go. Thanks
|
|
This is some cool stuff, thanks a ton On 14-Sep-2013, at 11:28 PM, sarabsethi [email protected] wrote:
|
|
Works an absolute treat - thanks! |
|
So prepare for the worst bug report ever. Sometimes (testing nexus 4 and nexus 7) when opening the app the sliding
|
|
No idea! Never seen such a behavior. Could you post some code, how you setup the icon? |
|
Here's the relevant part of my onCreate: this.setSlidingActionBarEnabled(false); if (this.findViewById(R.id.menu_frame) == null) { // normal phone layout } else { // tablet layout On Wed, Sep 18, 2013 at 9:58 AM, sockeqwe [email protected] wrote:
|
|
Do you use ActionBarSherlock or ActionBarCompat or the native ActionBar? The code seems ok! |
|
Action bar Sherlock, tried changing the drawable no luck though
|
|
I Could not reproduce this issue. I have tested on many real devices (incl. Nexus 4, Nexus 7, Nexus 10, new Nexus 7, Galaxy S2, Galaxy S3, Galaxy S4, Galaxy Nexus, HTC One) and everything has worked. I have also testet things on Emulators beginning from Android 2.2. Btw. The code for the drawable of the Slideable Icon is copy & paste from the official Android NavigationDrawer implementation |
|
OK thanks for your efforts, if I ever find the issue I'll let you know
|
|
@sockeqwe Together the two create the most Android design-like look (like gmail and gplus). Thank you! |
|
cool! Would you like to make a pull request to my SlidingMenu Repository, so we could merge them together in this one pull request. I hope that @jfeinstein10 will find some time to merge this pull request in the near future |
|
Ah, i see ... Thought your shadow mod belongs somewhere to my the actionbar / sliding icon changes. So simply forget about making a pull request my SlidingMenu repository. |
|
Understood. I am using the shadow outside but am looking to modify it to be more like gmail/gplus. As you open the drawer it fades the content area with a black overlay. |
|
Well but why should I not use the official Android ActionBarDrawerToggle implementation in this case? |
|
@sockeqwe, Good point. I will have to test that out real quick. I just was using this and not ActionBarDrawerToggle just because I already had time invested. |
|
@jfeinstein10 Do you want to merge this pull-request in the near future or do you think this will go in the wrong direction? |
|
Hi I am trying to use this but still can't get it working. |
|
It seems to be correct, only |
|
I have added this line of code setBehindContentView so I don't think I need add menu.attachToActivity, actually I got exception when I added it. I am using ActionBarSherlock version 4.2.0. It currently display default indicator (small left arrow icon) |
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).
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).