0

This is a very short question.

Is it possible to use the drawable (including the animation) of the "up" button that's used on the support library? I'm talking about the one that when you open a navigation drawer, it transforms itself from 3 lines into an arrow...

For example, on Google now launcher, this is the one:

enter image description here

If it's possible, how do I do it?

I know there are alternatives (like this one) , but is it possible to use the one of the support library?

android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • Do you want to use it in ActionBar or somewhere else in your code? – Nuwisam Dec 30 '14 at 14:13
  • @Nuwisam Anywhere. Not only on the ActionBar. Just like they did it on the screenshot you see... – android developer Dec 30 '14 at 14:31
  • Here's an article by WilliamJ. Francis which scratches the **why**: http://www.techrepublic.com/article/the-android-uis-back-button-vs-up-button-demystified/. Here's a link to the resources, if you wanted them: http://developer.android.com/downloads/design/Android_Design_Icons_20131106.zip. Here is how to change the ActionBar icon: http://www.feelzdroid.com/2014/10/programmatically-change-android-action-bar-homeasupindicator-navigation-icon.html. Hope it helped. – Phantômaxx Dec 30 '14 at 14:43
  • @DerGolem This is not what I've asked about. I asked about the new icon being used on Lollipop and the support library. It has a really nice animation between 3 lines and an arrow (and vice versa). – android developer Dec 30 '14 at 14:44
  • Ah, OK... I know nothing about Lollipop - I'm still targetting API Level 18, because of the AlarmManager issues in 19+. – Phantômaxx Dec 30 '14 at 14:46
  • @DerGolem OK, so try Google Now launcher, or even the Google play store, and you will see the animation I'm talking about. – android developer Dec 30 '14 at 15:42
  • Well, I should download it. Why? I'm trying to purge my phone from all the bloatware I don't need. I prefer to have the things I use... ;) – Phantômaxx Dec 30 '14 at 15:58
  • @DerGolem Well you can install and then uninstall it. Or you can also try the Play Store app itself, which has this icon (though it gets covered for some reason). You can also try my app: https://play.google.com/store/apps/details?id=com.lb.app_manager . – android developer Dec 30 '14 at 15:59
  • (Just watched the Play Store animation): it seems that the burger icon (people seem to like this name, I prefer "list" icon) makes a 45° (or so) rotation on its centre and back to 0°. Probably, using a [RotateAnimation](http://developer.android.com/reference/android/view/animation/RotateAnimation.html) – Phantômaxx Dec 30 '14 at 16:04
  • @DerGolem No, it's not just rotation animation. it morphes to a different icon - to an arrow, like so: https://camo.githubusercontent.com/a45273254d6db820e87b8291a0917420f542612c/68747470733a2f2f7261772e6769746875622e636f6d2f62616c7973762f6d6174657269616c2d6d656e752f6d61737465722f6172742f64656d6f5f6472617765722e676966 – android developer Dec 30 '14 at 16:59
  • @DerGolem Anyway, there are some third party libraries (like this one: https://github.com/balysv/material-menu ) that offer this, but I wanted to know if it's possible to use the one of the support library, instead of using a third party library. – android developer Dec 30 '14 at 17:04
  • Ah, OK. I somehow couldn't see it well (too fast, and covered by a navigation drawer). – Phantômaxx Dec 30 '14 at 17:05
  • @DerGolem Well there are plenty of apps that show it. I even have it on my tiny app. – android developer Dec 30 '14 at 17:06
  • @DerGolem No, I think it's deep in the support library, since it's supported on API 7 and above... – android developer Dec 30 '14 at 17:12
  • Yes, I guess so. Anyway it's one of those ones which you won't find on the hard disk. I refer to them like "android.R.drawable.*" – Phantômaxx Dec 30 '14 at 17:15
  • @DerGolem I think it's available somewhere on the support library code, via this Github repository: https://android.googlesource.com/platform/frameworks/support/ – android developer Dec 30 '14 at 17:18

0 Answers0