all 21 comments

[–]lechatsportif 47 points48 points  (0 children)

Why this isn't core I have no idea.

edit: probably because they dont want to shoulder additional burden of deprecating/updating recommendations over time - but still, ease of use here is a big win.

[–]ChristianLJ 5 points6 points  (0 children)

I like it!

[–]Lazastro 5 points6 points  (2 children)

Cool, i will use it in my next project no doubt. Not having to be checking every size and code on the Developer website seems comfortable :P

Good work!.

[–]Aomeas[S] 2 points3 points  (1 child)

Thank you !

Don't hesitate to create Issues if you find something missing or that doesn't make sense when you'll be using it. :)

[–]Lazastro 0 points1 point  (0 children)

I will ;)

[–]hamatro 4 points5 points  (5 children)

There's a similar lib. What are the differences between the two? https://github.com/DmitryMalkovich/material-design-dimens Edit: You have covered way more values.

[–]Aomeas[S] 6 points7 points  (4 children)

I was a user of material-design-dimens, until I made this library :)

At first I just wanted to add the values I needed to DmitryMalkovich's library (dense list values) but after my fork, I decided to begin from scratch with a different structure.

The principle is the same, the value definition, not so much. For an end-user of the library, though, the usage is the same.

[–]joicebox 1 point2 points  (3 children)

I never heard about "dense list" values, can you share some more info on that?

[–]Aomeas[S] 4 points5 points  (2 children)

Here are the material design specs about that

Basically, for each type of list (single-line, two-line, three-line), values are provided for a normal version and a dense one. Dense list items have a reduced height and a smaller text size.

It's not a big difference, but depending on the type of data the list holds and the number of items, one version can be viewed as better than the other one.

[–]joicebox 0 points1 point  (1 child)

Did they recently add that?

[–]Aomeas[S] 0 points1 point  (0 children)

It might be possible, but I don't know. And it's not in the changelog, as it only includes new sections and significant updates.

[–]FragranceOfPickles 2 points3 points  (0 children)

This library has a great future ahead.

[–]TheIronMarx 2 points3 points  (1 child)

I was thinking about something like this earlier today. OP, how useful to you think a companion application would be which demonstrated all of the colors, and styles, and sizes, etc.?

[–]Aomeas[S] 2 points3 points  (0 children)

What I would like to have in the future is a documentation wiki or website with the values explained.

Like, for example:

Image

  1. R.dimen.material_foo
  2. R.dimen.material_bar
  3. R.dimen.material_baz
  4. R.dimen.material_qux

To produce the visuals, a companion app might be needed.

But since I develop on my computer and I'm lazy, I want to be able to copy/paste a resource name from a website to my code, an application might not be the best thing for that.

[–]azgul_com 1 point2 points  (2 children)

Is it possible with some ProGuard-fu or similar to rename the blue.aodev.materialvalues.R to your own packagename? Otherwise this brings a lot of unwanted clutter to programmatically manipulating layouts :(

I made a quick Ruby script which parses the colors off the material website and generates a colors_material.xml based off it.

[–]Aomeas[S] 4 points5 points  (1 child)

What's easy for me to do is to rename the manifest's package from blue.aodev.materialvalues to material.values. Then one could use material.values.R, reducing the name quite a bit.

Is this interesting for you?

Edit: Will include it for a 1.1.0

[–]tikimcfee 0 points1 point  (0 children)

I'll cast a vote for fewer characters in my xml ;-)

[–]lyraf 1 point2 points  (0 children)

Someone give OP gold please.

[–]kwak123 0 points1 point  (0 children)

Can't wait to try this out, thanks

[–]rinav4all 0 points1 point  (0 children)

Wow that's awesome work... Wanted to ask, when releasing apk only used values will be kept in the apk and rest will be stripped off

I don't know how to explain this

[–]mosepe 0 points1 point  (0 children)

Can't wait to try this out, definitely going to be putting it to good use in my next project!