本文整理汇总了Java中yuku.ambilwarna.AmbilWarnaDialog类的典型用法代码示例。如果您正苦于以下问题:Java AmbilWarnaDialog类的具体用法?Java AmbilWarnaDialog怎么用?Java AmbilWarnaDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AmbilWarnaDialog类属于yuku.ambilwarna包,在下文中一共展示了AmbilWarnaDialog类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setBgColor
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
/**
* Set the background color to btnBgColor and vBgColorField.
*
* @param color color to set
* @param fromProgressBar true, if setColor is called from onProgessChanged()
*/
private void setBgColor(final int color, final boolean fromProgressBar) {
Log.d(TAG, "setBgColor(", color, ", ", fromProgressBar, ")");
String hex = AmbilWarnaDialog.colorToString(color);
Log.d(TAG, "color: ", hex);
while (hex.length() < 9) {
hex = "#0" + hex.substring(1);
Log.d(TAG, "color: ", hex);
}
btnBgColor.setText(hex);
vBgColor.setBackgroundColor(color);
if (!fromProgressBar) {
int trans = color >> BITSHIFT_TRANSPARENCY;
Log.d(TAG, "transparency: ", trans);
if (trans < 0) {
trans = 256 + trans;
Log.d(TAG, "transparency: ", trans);
}
sbBgTransparency.setProgress(255 - trans);
}
}
示例2: setBgColor
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
/**
* Set the background color to btnBgColor and vBgColorField.
*
* @param color color to set
* @param fromProgressBar true, if setColor is called from onProgessChanged()
*/
private void setBgColor(final int color, final boolean fromProgressBar) {
Log.d(TAG, "setBgColor(", color, ", ", fromProgressBar, ")");
String hex = AmbilWarnaDialog.colorToString(color);
btnBgColor.setText(hex);
vBgColor.setBackgroundColor(color);
if (!fromProgressBar) {
int trans = color >> BITSHIFT_TRANSPARENCY;
Log.d(TAG, "transparency: ", trans);
if (trans < 0) {
trans = 256 + trans;
Log.d(TAG, "transparency: ", trans);
}
sbBgTransparency.setProgress(255 - trans);
}
}
示例3: openColorPickerDialog
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
/**
* Create new dialog for color picker and show it
*
* @param supportsAlpha whether to handle alpha
*/
private void openColorPickerDialog(boolean supportsAlpha) {
Log.d(TAG, "show color picker dialog...");
AmbilWarnaDialog dialog = new AmbilWarnaDialog(this, drawView
.getPaintColor(), supportsAlpha, getColorPickerCallback());
dialog.show();
}
示例4: setTextColor
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
/**
* Set the text color to btnTextColor and vTextColorField.
*
* @param color color to set
*/
private void setTextColor(final int color) {
Log.d(TAG, "setTextColor(", color, ")");
String hex = AmbilWarnaDialog.colorToString(color);
Log.d(TAG, "color: ", hex);
while (hex.length() < 9) {
hex = "#0" + hex.substring(1);
Log.d(TAG, "color: ", hex);
}
btnTextColor.setText(hex);
vTextColor.setBackgroundColor(color);
}
示例5: onCancel
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {
// TODO Auto-generated method stub
}
示例6: onOk
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
persistInt(color);
}
示例7: onOk
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog ambilWarnaDialog, int i) {
customEditor.setColor(i, selectionStart, selectionEnd);
imgChangeColor.setBackgroundColor(i);
}
示例8: onOk
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
customEditor.setColor(color, selectionStart, selectionEnd);
imgChangeColor.setBackgroundColor(color);
}
示例9: getDialog
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public Dialog getDialog() {
int colour = this.getPersistedInt( this.defaultColour );
return new AmbilWarnaDialog(this.getContext(), colour, this ).getDialog();
}
示例10: onCancel
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog ambilWarnaDialog) {
}
示例11: onCancel
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {
}
示例12: onCancel
import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {
}