I
I
Ilya2015-06-05 09:18:38
Android
Ilya, 2015-06-05 09:18:38

How to make an ActionBar button with a NavigationDrawer like in the Habr, VK, etc. application?

I'm making an application in Android Studio, I created an activity with NavigationDrawer according to the proposed template, and I can't customize the home button in the ActionBar.
It looks like this now:
3wADetNpqmM.jpg
What I don't like:

  • The application icon was determined only programmatically (
    getSupportActionBar().setIcon(R.mipmap.ic_launcher);
    ), the application did not react to the :logo entries in the manifest and styles
  • Only the part where the hamburger is currently hanging is pressed. Moreover, the hamburger itself is too far from the left edge of the screen.

I have scoured the internet and have not found an answer to my question.
So how do you make it all look human, like in these applications?
9KsS1Fh2emE.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
afeozzz, 2015-06-05
@afeozzz

https://developer.android.com/training/implementin...
habrahabr.ru/post/236567

B
Boris K., 2015-06-06
@kaftanati

This kind of side menu icon is deprecated. Moreover, it is not recommended to use the application icon in the bar. Recently struggled with a hamburger. As a result, I settled on the standard version - which is offered at the first launch of a new project.
But the look of your menu icon is somewhat... odd. What are your target versions of android in the gradle file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question