Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Library] Color picker (Open Source)

OP Devmil

5th January 2011, 10:15 PM   |  #1  
OP Retired Recognized Developer
Thanks Meter: 269
 
155 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Hi guys,

I don't know if this is the right forum, so please forgive me if it isn't

During the development of Minimalistic Text I came across the lack of a good color picker view for Android.
In the first attempt I used the one from the samples (The "Ring").
The second attempt has been to integrate this one and add the possibility to change the alpha channel.
In the end I decided to build my own.
To let you use this color picker and - if you like to and are able to - improve it, I've extracted it into an Android library project and made it open source.
It's hosted at Google Code:
http://code.google.com/p/devmil-android-color-picker/

The code has almost no code comments. I will add them if I have time.
At the moment it is localized to German and English.

Please let me know what you think and write me an email if you want to contribute.

Thanks

Devmil

Here are some screenshots (in German):


Attached Thumbnails
Click image for larger version

Name:	scrn1.jpg
Views:	6811
Size:	23.3 KB
ID:	481465   Click image for larger version

Name:	scrn2.jpg
Views:	6780
Size:	22.7 KB
ID:	481466   Click image for larger version

Name:	scrn3.jpg
Views:	6755
Size:	22.4 KB
ID:	481467  
Last edited by Devmil; 5th January 2011 at 10:20 PM.
The Following 13 Users Say Thank You to Devmil For This Useful Post: [ View ]
8th January 2011, 05:22 PM   |  #2  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Mar 2010
I guess you never found hxxp://code.google.com/p/color-picker-view/ which has been around for a while now. It got an optional alpha slider too.

But on the other hand it doesn't support HEX input or RGB sliders like yours.
8th January 2011, 05:26 PM   |  #3  
OP Retired Recognized Developer
Thanks Meter: 269
 
155 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Quote:
Originally Posted by afzkl

I guess you never found hxxp://code.google.com/p/color-picker-view/ which has been around for a while now. It got an optional alpha slider too.

But on the other hand it doesn't support HEX input or RGB sliders like yours.

no, I haven't found this one. But the one I have used before is quite similar. I added the alpha slider to it.
The main difference for the new selector is the choice between the three input methods.
19th January 2011, 10:14 PM   |  #4  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Jan 2008
Post
Working on project created ColorPickerPreference.
Shared it here github.com/attenzione/android-ColorPickerPreference (sorry, can't post links)

Why not RGB sliders or HEX input field?
because regular users will not use them. this is our project group opinion
20th January 2011, 07:35 AM   |  #5  
Smasher816's Avatar
Senior Member
Flag Missouri
Thanks Meter: 166
 
391 posts
Join Date:Joined: Jan 2011
Donate to Me
More
OP Thanks, this is just what i was looking for. I wanted a color picker where you could choose a color like in photoshop but also input exact values for the more advanced users. Is it alright if i take a look at the code and see if I can get it all on one tab. Ill probably just end up using your stock one though.
20th January 2011, 08:00 PM   |  #6  
OP Retired Recognized Developer
Thanks Meter: 269
 
155 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Quote:
Originally Posted by Smasher816

OP Thanks, this is just what i was looking for. I wanted a color picker where you could choose a color like in photoshop but also input exact values for the more advanced users. Is it alright if i take a look at the code and see if I can get it all on one tab. Ill probably just end up using your stock one though.

Yes, of course! This is why it is open source

Devmil
The Following User Says Thank You to Devmil For This Useful Post: [ View ]
4th February 2011, 04:44 AM   |  #7  
Recognized Developer
Thanks Meter: 28
 
169 posts
Join Date:Joined: Dec 2008
Thank you!

When I was programming for WM in c# I had occasion to need a colour picker, but never really found one and couldn't be bothered to create it myself (the program was intensive enough by itself not to want to add something like this to it). Now I have transitioned to android I'm sure that I'll need this at one point. so thank you for sharing this! I might never need it (although I'm pretty sure I will use it), but if and when I do, I'll be damn thankful that you put in the effort!

So again, thanks!

-edit-
I'm having some trouble getting the code...seems I need some kind of version control software, but I wouldn't know which one (Mercurial?). Could you add a source download (.zip or .rar) for me to download so I could use (link/include) it in Eclipse? Or am I really being a noob at this (I have successfully used other libraries in c#, so I'm not a total noob :P).


On further inspection: I can access the sourcecode, but I guess I just don't know code.google.com AT ALL. I can create a server side clone (don't want to do that, I think), and I can go through all the files in the source and copy/paste to local files, but do I really have to do that to integrate this? Could someone tell me (or point to a tutorial) the best way to get all the code local so I cn use it? Or is the best way just to check out the source online (source file by source file) and copy/paste it into my own project as and how I need it?

Sorry for being a noob, but as I mentioned, I come from c# and have zero experience with code.google.com. I know enough to get everything into my Eclipse project through copy/paste, but there must be a better way!

PS: on winxp sp3, eclipse 3.6 (android 2.2, targetting 1.6, but that's beside the point, if I'm at all in the right ballpark :P)
Last edited by MacDegger; 4th February 2011 at 05:08 AM. Reason: -noobishness-
18th September 2011, 02:43 AM   |  #8  
rjmarsan's Avatar
Member
Thanks Meter: 16
 
40 posts
Join Date:Joined: Apr 2011
Awesome library! I hacked it up a bit, adding a recent colors list, turning it into a activity, and added it to my app https://market.android.com/details?id=com.rj.pixelesque
29th February 2012, 06:37 PM   |  #9  
Member
Flag Ogden, Utah
Thanks Meter: 18
 
76 posts
Join Date:Joined: Sep 2008
More
Amazing Work
Thanks so much for the color picker, this improved the function of my app if a big way. Thanks YOU!
8th June 2012, 01:47 PM   |  #10  
Member
Flag delhi
Thanks Meter: 1
 
63 posts
Join Date:Joined: Jun 2011
More
can i use this in my paid app??

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes