幾個不錯的色彩選取介面程式 Color Picker
HoloColorPicker 共提供5種元件供使用 ColorPicker, SVBar, OpacityBar, SaturationBar, ValueBar. 如
AmbilWarna | Industrial Solutions | Chiralcode | HoloColorPicker |
HoloColorPicker 共提供5種元件供使用 ColorPicker, SVBar, OpacityBar, SaturationBar, ValueBar. 如
使用<com.larswerkman.holocolorpicker.ColorPicker android:id="@+id/picker" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
ColorPicker picker = (ColorPicker) findViewById(R.id.picker); SVBar svBar = (SVBar) findViewById(R.id.svbar); OpacityBar opacityBar = (OpacityBar) findViewById(R.id.opacitybar); SaturationBar saturationBar = (SaturationBar) findViewById(R.id.saturationbar); ValueBar valueBar = (ValueBar) findViewById(R.id.valuebar); picker.addSVBar(svBar); picker.addOpacityBar(opacityBar); picker.addSaturationBar(saturationBar); picker.addValueBar(valueBar); picker.getColor();//取得顏色 //To set the old selected color u can do it like this picker.setOldCenterColor(picker.getColor()); // adds listener to the colorpicker which is implemented //in the activity picker.setOnColorChangedListener(this); //to turn of showing the old color picker.setShowOldCenterColor(false); //adding onChangeListeners to bars opacitybar.setOnOpacityChangeListener(new OnOpacityChangeListener …) valuebar.setOnValueChangeListener(new OnValueChangeListener …) saturationBar.setOnSaturationChangeListener(new OnSaturationChangeListener …)