GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - attenzione/android-ColorPickerPreference: ColorPickerPreference for android to create color picker in preferences. Project created as Library

BranchesTags
Open more actions menu

Latest commit

 

History

83 Commits
83 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.settings
.settings
 
 
ColorPickerPreference
ColorPickerPreference
 
 
Sample
Sample
 
 
gradle/wrapper
gradle/wrapper
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.project
.project
 
 
CHANGELOG.rst
CHANGELOG.rst
 
 
ColorPickerPreference.iml
ColorPickerPreference.iml
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
android-ColorPickerPreference.iml
android-ColorPickerPreference.iml
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
screen_1.png
screen_1.png
 
 
screen_2.png
screen_2.png
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

ColorPickerPreference

Generally used classes by Daniel Nilsson. ColorPickerPreference class by Sergey Margaritov. Packed by Sergey Margaritov. Packed again and made Gradle compatible by Vincent Fischer.

Features

  • Color Area
  • Hue Slider
  • Alpha Slider (disabled by default)
  • Old & New Color
  • Color Preview in Preferences List

Requirements

Tested with APIv7, but maybe will work with early versions

Installation

Through Gradle

You can now install this through Gradle with a simple:
implementation 'net.margaritov.preference.colorpicker.ColorPickerPreference:ColorPickerPreference:1.0.0'

Android Studio

  1. Paste or clone this library into the /libs folder, in the root directory of your project. Create a new folder: /libs if not already present. (This step is not required - only for keeping cleaner project structure)
  2. Edit settings.gradle by adding the library. You have also define a project directory for the library. Your settings.gradle should look like below:
include ':app', ':ColorPickerPreference'
project(':ColorPickerPreference').projectDir = new File('app/libs/ColorPickerPreference')
  1. In app/build.gradle add the ColorPickerPreference library as a dependency:
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:21.0.3'
    implementation project(":ColorPickerPreference")
}
  1. Sync project, clean and build. You can use the ColorPickerPreference library as part of your project now.

Eclipse

  1. Before you can add a ColorPickerPreference to your application, you must first add a library reference:
  2. Clone or download a copy of the library
  3. Import the library into Eclipse: File menu -> Import -> Existing Project into Workspace
  4. Open your application's project properties and add a library reference to ColorPickerPreference

Usage

You can see some tests inside

<net.margaritov.preference.colorpicker.ColorPickerPreference
    android:key="color1"
    android:title="@string/color1_title"
    android:summary="@string/color1_summary"
    android:defaultValue="@color/pumpkin_orange"    <!-- integer resources are also accepted -->
    alphaSlider="true"                              <!-- enable alpha slider via XML -->
/>

To enable Alpha Slider in your code use function:

setAlphaSliderEnabled(boolean enable)

Screens

  • https://github.com/C0br4/ColorPickerPreference/raw/master/screen_1.png
  • https://github.com/C0br4/ColorPickerPreference/raw/master/screen_2.png

About

ColorPickerPreference for android to create color picker in preferences. Project created as Library

Topics

androidandroid-libraryandroid-preferencecolor-pickerjava

Resources

Readme
Apache-2.0 license
Activity

Stars

706 stars

Watchers

54 watching

Forks

288 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.