Android PreferenceScreen "color picker" implementation

Michal picture Michal · Jan 13, 2013 · Viewed 13.9k times · Source

can someone help me? I need implement some color picker to preference screen (live wallpaper settings). Is there any solution out there, some open source?

Answer

Martin Stone picture Martin Stone · Jul 28, 2015

Too late for the original questioner I expect, but here's the library I wrote after not finding what I needed here. It can be used like this:

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <com.rarepebble.colorpicker.ColorPreference
        android:key="myColor"
        android:title="@string/pref_title"
        android:defaultValue="#f00"
        />
</PreferenceScreen>

More info here:

HSV-Alpha Color Picker for Android (GitHub).

HSV-Alpha Color Picker Demo (Google Play).

I hope it's useful for somebody else.

ColorPreference Color Picker