本文整理汇总了Java中com.larswerkman.holocolorpicker.ColorPicker.setShowOldCenterColor方法的典型用法代码示例。如果您正苦于以下问题:Java ColorPicker.setShowOldCenterColor方法的具体用法?Java ColorPicker.setShowOldCenterColor怎么用?Java ColorPicker.setShowOldCenterColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.larswerkman.holocolorpicker.ColorPicker
的用法示例。
在下文中一共展示了ColorPicker.setShowOldCenterColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateDialog
import com.larswerkman.holocolorpicker.ColorPicker; //导入方法依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
mRootView = (ViewGroup) layoutInflater.inflate(R.layout.advanced_color_picker, null);
mColorPicker = (ColorPicker) mRootView.findViewById(R.id.color_picker);
mSvBar = (SVBar) mRootView.findViewById(R.id.svbar);
mOpacityBar = (OpacityBar) mRootView.findViewById(R.id.opacitybar);
mColorPicker.addSVBar(mSvBar);
hexEdit = (EditText) mRootView.findViewById(R.id.hex);
hexApply = (Button) mRootView.findViewById(R.id.apply);
hexEdit.setFilters(new InputFilter[] { ALPHANUMERIC });
hexApply.setOnClickListener(hexApplyListener);
String hexColor = String.format("%06X", (0xFFFFFF &
ColorDialogFragment.getColor(startColor, 255)));
hexEdit.setHint(hexColor);
mColorPicker.addOpacityBar(mOpacityBar);
mColorPicker.setOldCenterColor(startColor);
mColorPicker.setShowOldCenterColor(true);
return new AlertDialog.Builder(getActivity())
.setView(mRootView)
.setNegativeButton(android.R.string.cancel, clickListener)
.setPositiveButton(android.R.string.ok, clickListener)
.create();
}
示例2: init
import com.larswerkman.holocolorpicker.ColorPicker; //导入方法依赖的package包/类
private void init() {
LayoutInflater.from(getContext()).inflate(R.layout.label_edit_view, this, true);
textview = (TextView) findViewById(R.id.label_name_edit);
textview.addTextChangedListener(this);
picker = (ColorPicker) findViewById(R.id.picker);
SVBar svBar = (SVBar) findViewById(R.id.svbar);
OpacityBar opacityBar = (OpacityBar) findViewById(R.id.opacitybar);
picker.addSVBar(svBar);
picker.addOpacityBar(opacityBar);
picker.setShowOldCenterColor(false);
picker.setOnColorChangedListener(this);
}
示例3: onCreate
import com.larswerkman.holocolorpicker.ColorPicker; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notti_device);
Intent intent = getIntent();
address = intent.getStringExtra("deviceAddr");
String deviceName = intent.getStringExtra("deviceName");
setTitle(deviceName.trim() + " [ " + address + " ] ");
//init toggle button
ToggleButton onOff = (ToggleButton) findViewById(R.id.ledButton);
onOff.setOnClickListener(this);
//init color picker
ColorPicker picker = (ColorPicker) findViewById(R.id.picker);
picker.setOnColorChangedListener(this);
picker.setShowOldCenterColor(false);
//init seekbar
SeekBar luminosityBar = (SeekBar) findViewById(R.id.intensity_bar);
luminosityBar.setOnSeekBarChangeListener(this);
Intent intentMain = new Intent(this, NottiBtService.class);
// bind the service to current activity and create it if it didnt exist before
startService(intentMain);
bindService(intentMain, mServiceConnection, BIND_AUTO_CREATE);
}