Skip to content
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

Any way to totally disable multi-accounts/the down arrow on the bottom right of the header? #1947

Closed
therealccarter opened this issue Jul 12, 2017 · 15 comments
Assignees
Labels

Comments

@therealccarter
Copy link

So I'm only adding a profile once, but occasionally I'll have one to two little profile pictures in the upper right side of the header. There's also the bottom right arrow that shows profiles in the nav drawer. I'd like to disable all of this stuff. There will never be more than one profile and in my app you'd never need to hit that down arrow and view profiles.

How can I disable those features?

@mikepenz
Copy link
Owner

https://github.com/mikepenz/MaterialDrawer/blob/develop/FAQ/accountheader_single_profile_without_dropdown.md

@mikepenz mikepenz self-assigned this Jul 12, 2017
@therealccarter
Copy link
Author

The problem persists.

@mikepenz
Copy link
Owner

@therealccarter what else do you want? The above code switches it to a single profile.

If you want only a header. then just use the withHeader function

@mikepenz
Copy link
Owner

Just have a look into the sample application, it already showcases some possibilities

@therealccarter
Copy link
Author

therealccarter commented Jul 14, 2017

I just wanted to let you know that the "above code" did not fix the problem. I can go to Stack Overflow next time if this isn't the right place to work out issues about this library.

@Rainer-Lang
Copy link

@therealccarter Post your code so someone could have a look. But please with the suggested code change of @mikepenz already inside.

@therealccarter
Copy link
Author

Will do tomorrow, thanks!

@mikepenz
Copy link
Owner

Well I just asked for your requirement. As there is clearly some miscommunication.

If you only have one profile and do not want the arrow to show up and so in the header, the sent FAQ will work definitely as it was used by dozens before you the same way

@therealccarter
Copy link
Author

therealccarter commented Jul 14, 2017

Yeah. Thanks for the help so far, I really appreciate it.

Here is the Base Activity that I extend in the activities that user the Material Drawer. Line 11 shows the suggested code added.

https://codeshare.io/5zX6Qj

While you guys look at that, I'll look through the sample application for something else that I may be doing wrong.

@mikepenz mikepenz reopened this Jul 14, 2017
@mikepenz
Copy link
Owner

@therealccarter could you please try again to describe what you want to achieve. Or provide a picture to show how it should look like?

I am afraid that there is some confusion here.

@therealccarter
Copy link
Author

So here's a picture of what it looks like currently.

http://i.imgur.com/wvClTOi.jpg

What I'd like is to get rid of the "down" arrow on the bottom right, as well as the multiple profile images shown on the upper right corner. Sometimes there's no other profiles, sometimes there's 1, 2, 3, or 4 extra profiles. All are the same one profile, just repeated a bunch of times.

@mikepenz
Copy link
Owner

@therealccarter why do you anyways add so many profiles if you don't need them?

If you just wan't 1 profile to be shown, and just the icon + the text without the arrow or the fucntion then

.withSelectionListEnabledForSingleProfile(false)

will work.

But as the method name already clearly states, this will only change the appearance in case there is only one, and exact only one profile defined

@therealccarter
Copy link
Author

Well, I'm not intentionally adding more than one profile. Perhaps profiles are being retained between sessions? I'll try some more testing to pinpoint where extra profiles are being added...

@mikepenz
Copy link
Owner

@therealccarter the drawer can't keep the objects, they are not serializeable.
The drawer will only keep positions of the selection.

Something in your code is adding more and more profiles.

Just as a reminder. You do not have to use the AccountHeader you can simply also supply your own view

@therealccarter
Copy link
Author

Alright, now that I know the problem is my code adding more than one profile, I'll have something to look for. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants