hsv-alpha-color-picker-android icon indicating copy to clipboard operation
hsv-alpha-color-picker-android copied to clipboard

resize the thumbnail in setting page

Open ghost opened this issue 8 years ago • 3 comments

Is it possible to resize the color picker thumbnail in the setting page? for instance, make it the same size as the checkbox or make it a small circle. thanks

ghost avatar May 30 '16 23:05 ghost

If you're building the library locally, you should be able to simply change the value for preference_thumbnail_size in dimens.xml:

https://github.com/martin-stone/hsv-alpha-color-picker-android/blob/d60035f78eeb82e3cec9524fa1c2da79c61c3c28/colorpicker/src/main/res/values/dimens.xml#L6

It's not user-configurable if you're just linking to the library.

martin-stone avatar Jun 05 '16 15:06 martin-stone

@martin-stone I just added to gradle . Is it possible to make it user configurable via the xml? something like this:

 <com.rarepebble.colorpicker.ColorPreference
            android:key="simplePreference"
            android:title="@string/pref_title"
            app:colorpicker_defaultColor="#f00"
            **app:preference_thumbnail_size="25dp"** 
            />

in that case it would be awesome.

ghost avatar Jun 05 '16 21:06 ghost

I'm happy to consider a pull request. (Otherwise I'm not sure when I'll get time to look at it.)

martin-stone avatar Jun 06 '16 07:06 martin-stone