Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

No account drawer #40

Closed
mkosik opened this issue Dec 25, 2014 · 18 comments
Closed

No account drawer #40

mkosik opened this issue Dec 25, 2014 · 18 comments

Comments

@mkosik
Copy link

mkosik commented Dec 25, 2014

There are apps that don't need a user to be logged in. In such case, in "account area" there is just a text of a size "abc_text_size_headline_material" - usually by def white, with some background, usually only a color (accent in some apps). Nothing else, pretty simple.

@neokree
Copy link
Owner

neokree commented Dec 25, 2014

Can you find me an example image or an app for this type of drawer?

@mkosik
Copy link
Author

mkosik commented Dec 25, 2014

I know I saw some examples in past, but I went thru so much resources lately, I cannot remember where. I asked for it in G+ Android App Design group. Another approach to this common for some apps is just to leave out "accounts section" entirely and start with normal sections.

@neokree
Copy link
Owner

neokree commented Dec 25, 2014

mmm and simply set the background image instead to remove all the account view?
Like Youtube background, but without any type of user data.
Because I think that simply delete the space is crap

@mkosik
Copy link
Author

mkosik commented Dec 26, 2014

Well some apps like calculator and such don't really need account area at all.
screenshot_2014-12-26-01-28-10
I know this one isn't the best example, because it doesn't follow material design guidelines correctly, but just to make my point - starting with sections (usually type icon + text), isn't that bad & sometimes useful - and it doesn't violate the guidelines really.

I know, I like that account 16:9 section too & I tell U, I saw somewhere a very elegant solution - just some simple background / color bg + headline size white text, aligned to the left as the current text is. But I'm not sure in which height it was, maybe inline with such headline text in case of extended size toolbar.

I think both are useful & people would find more useful one over another in their use-cases.

@neokree
Copy link
Owner

neokree commented Dec 26, 2014

for now I added a method that allows to remove all the account data and set a simple background.
I called it replaceDrawerHeader() but suggestions are welcome

@mkosik
Copy link
Author

mkosik commented Dec 28, 2014

well as I said, it would be nice to have options to either:

  1. remove accounts section entirely (and it doesn't violate the specs in no means), and
  2. use accounts section with one line, headline style white text.

UPDATE: here's an example with a headline (size & style) text in accounts section from app "TrackThisForMe" - I know it's not perfect impl. of the drawer, but just to give you an idea that it might look really good implemended correctly (& they have a lot of meterial design stuff implemented correctly).
screenshot_2014-12-29-00-44-45

@randombyte-developer
Copy link

@neokree There should be the possibility to hide the accounts section completly. So the only thing to do is to remove the views like in replaceDrawerHeader() and additionally remove the ImageView 'usercover'. Call the method something like 'noAccounts()' and you have done it. 😃

@neokree
Copy link
Owner

neokree commented Jan 2, 2015

ehm, yes but no. @randombyte-developer you forgot the status bar on lollipop devices, the drawer is between the status bar and the status bar background, so when you remove all user section it should be a little space for status bar, but I actually don't know if I have to color it with the background status bar or simple add some padding from the top

@randombyte-developer
Copy link

Sorry, I didn't get your point.
Do you mean, that you don't know, what is right in material design? Personally, I think you should just add padding.
Or do you mean that the color is different? Maybe a screenshot?

Edit: Ah, okay... Try to use padding.

@neokree
Copy link
Owner

neokree commented Jan 4, 2015

I have uploaded three new screenshot on the EXAMPLE.md file. Please see if is a possible solution.

@randombyte-developer
Copy link

On my Nexus 6, the example app and my app behave wrong. When I select no header the drawer is so tiny.

screenshot_2015-01-05-20-36-03 1

Because I have to release my app soon, I set the custom header to

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="240dp">

    <View
        android:layout_width="240dp"
        android:layout_height="wrap_content" />

    </LinearLayout>

That works not perfectly but is acceptable.

Edit: No, not acceptable. With that custom drawer, the bottomSection doesn't show the text. Only the icon. And the section is not clickable in the whole width, only there, where the icon is.

@neokree
Copy link
Owner

neokree commented Jan 5, 2015

Actually it is an issue only on nexus 6, I suppose for the hight resolution of the screen.
In the example app the others navigation drawers works or they still have this issue?

@mkosik
Copy link
Author

mkosik commented Jan 5, 2015

If there is no account section at all, sections should not go behind status bar, because it will look wrong.
So padding or something should be in order.

For apps that use no status bar coloring / behind the status bar theme on KitKat, there should be no padding and items should start from the top (as the Toolbar starts as well).

@neokree
Copy link
Owner

neokree commented Jan 6, 2015

For the nexus 6 and hight resolutions devices problem, I found a solution.
Now I'm working for remove the drawer between the status bar when you select the NO_HEADER option.

@mkosik
Copy link
Author

mkosik commented Jan 8, 2015

We've got "an official" statement to this by Ian Lake (Android Dev team at Google). Check this @neokree:
https://plus.google.com/u/0/+MiroslavKo%C5%A1%C3%ADk/posts/jeQGkAXUtvA

@drinfernoo
Copy link

Any news on this? Another thing I'm seeing on my N6 is this: http://imgur.com/zHOuFz8, when setting the images as Bitmaps. It basically looks like the width just isn't being calculated right. Could we maybe get a way to manually set the width?

@neokree
Copy link
Owner

neokree commented Jan 20, 2015

@drinfernoo what version are you using? Because in 1.2.9 there was a problem for hight resolution and small screen devices, but in 1.3 alpha version there is fixed.

@randombyte-developer
Copy link

Bug on Nexus 6 fixed! Drawer expands normally.

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

No branches or pull requests

4 participants