当前位置: 首页>>代码示例>>Java>>正文


Java AmbilWarnaDialog类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:27,代码来源:StatsAppWidgetConfigure.java

示例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);
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:22,代码来源:LogsAppWidgetConfigure.java

示例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();
}
 
开发者ID:julesbond007,项目名称:Android-Jigsaw-Puzzle,代码行数:12,代码来源:DrawActivity.java

示例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);
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:17,代码来源:StatsAppWidgetConfigure.java

示例5: onCancel

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {
	// TODO Auto-generated method stub
	
}
 
开发者ID:benjamarle,项目名称:typhon,代码行数:6,代码来源:ColourChooserPref.java

示例6: onOk

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
	persistInt(color);		
}
 
开发者ID:benjamarle,项目名称:typhon,代码行数:5,代码来源:ColourChooserPref.java

示例7: onOk

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog ambilWarnaDialog, int i) {
    customEditor.setColor(i, selectionStart, selectionEnd);
    imgChangeColor.setBackgroundColor(i);
}
 
开发者ID:geekpradd,项目名称:Material-Notes,代码行数:6,代码来源:EditNote.java

示例8: onOk

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
    customEditor.setColor(color, selectionStart, selectionEnd);
    imgChangeColor.setBackgroundColor(color);
}
 
开发者ID:trietphm,项目名称:CustomEditor,代码行数:6,代码来源:MainActivity.java

示例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();
	
}
 
开发者ID:benjamarle,项目名称:typhon,代码行数:9,代码来源:ColourChooserPref.java

示例10: onCancel

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog ambilWarnaDialog) {

}
 
开发者ID:geekpradd,项目名称:Material-Notes,代码行数:5,代码来源:EditNote.java

示例11: onCancel

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {

}
 
开发者ID:trietphm,项目名称:CustomEditor,代码行数:5,代码来源:MainActivity.java

示例12: onCancel

import yuku.ambilwarna.AmbilWarnaDialog; //导入依赖的package包/类
@Override
public void onCancel(AmbilWarnaDialog dialog) {
    
}
 
开发者ID:trietphm,项目名称:CustomEditor,代码行数:5,代码来源:DemoActivity.java


注:本文中的yuku.ambilwarna.AmbilWarnaDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。