1gravity / Android-ContactPicker

A beautifully designed component to pick one or several contacts (including groups) from the Android contacts list
Apache License 2.0
66 stars 33 forks source link

Bug/select contact and view contact details deselect contacts and feature/show only contact tab. #29

Closed LeonardooBorges closed 7 years ago

LeonardooBorges commented 7 years ago

Issues #20 #26 done.

Hi @1gravity, I really appreciate your work in this lib and it helped me very much. I fixed some bugs and problems and want to contribute, so I opened this PR. .

As the issues says, I fixed the problem of selecting contacts and then opening a contact details gets all previous contacts to be deselected. I also added an option to allow showing only the contacts tab (hide the group one).

I also added an option to get the map containing all the phone numbers, emails and addresses as well as documentation.

I expect your review.

1gravity commented 7 years ago

Thank you very much for your contribution. This looks really great. I especially like all the added documentation and reformatting of some of the code. I haven't tested it though but will do so on the weekend before I merge it.

One question though, why did you change the default values in the ContactImpl.java to empty string for the getter methods?

LeonardooBorges commented 7 years ago

Hello @1gravity I really appreciate that you liked the PR. I changed to empty strings because if someone calls that method, with a TYPE_MOBILE code by example, and it returns something, this person will assume that this return really is a mobile phone number, but in the way it was, the method was returning any number if the Map did not contained the type sent. I can remove the && !mEmail.isEmpty() in the if also. But nevertheless if you want to change it back to the way it was, I can do that too.

LeonardooBorges commented 7 years ago

Hi @1gravity is there a prevision for the review? There are some projects in the company I work that would use this lib 😄

binarybit10 commented 7 years ago

Hi, I would also like to have the feature: "show only contact tab" (User has the option to disable Groups tab)
@LeonardooBorges thanks for your merge.

@1gravity I was looking for a project like this, your work is extremely useful, maybe I will have to wait for the merge to complete.

Also, I'm seeing the same issue as listed in #28 Thanks again - 👍 for the project :)