com.flask.colorpicker.R Java Examples

The following examples show how to use com.flask.colorpicker.R. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColorPickerDialogBuilder.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
private ColorPickerDialogBuilder(Context context, int theme) {
	defaultMargin = getDimensionAsPx(context, R.dimen.default_slider_margin);
	final int dialogMarginBetweenTitle = getDimensionAsPx(context, R.dimen.default_slider_margin_btw_title);

	builder = new AlertDialog.Builder(context, theme);
	pickerContainer = new LinearLayout(context);
	pickerContainer.setOrientation(LinearLayout.VERTICAL);
	pickerContainer.setGravity(Gravity.CENTER_HORIZONTAL);
	pickerContainer.setPadding(defaultMargin, dialogMarginBetweenTitle, defaultMargin, defaultMargin);

	LinearLayout.LayoutParams layoutParamsForColorPickerView = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0);
	layoutParamsForColorPickerView.weight = 1;
	colorPickerView = new ColorPickerView(context);

	pickerContainer.addView(colorPickerView, layoutParamsForColorPickerView);

	builder.setView(pickerContainer);
}
 
Example #2
Source File: ColorPickerDialogBuilder.java    From timecat with Apache License 2.0 6 votes vote down vote up
private ColorPickerDialogBuilder(Context context, int theme) {
	defaultMargin = getDimensionAsPx(context, R.dimen.default_slider_margin);
	final int dialogMarginBetweenTitle = getDimensionAsPx(context, R.dimen.default_slider_margin_btw_title);

	builder = new AlertDialog.Builder(context, theme);
	pickerContainer = new LinearLayout(context);
	pickerContainer.setOrientation(LinearLayout.VERTICAL);
	pickerContainer.setGravity(Gravity.CENTER_HORIZONTAL);
	pickerContainer.setPadding(defaultMargin, dialogMarginBetweenTitle, defaultMargin, defaultMargin);

	LinearLayout.LayoutParams layoutParamsForColorPickerView = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0);
	layoutParamsForColorPickerView.weight = 1;
	colorPickerView = new ColorPickerView(context);

	pickerContainer.addView(colorPickerView, layoutParamsForColorPickerView);

	builder.setView(pickerContainer);
}
 
Example #3
Source File: AbsCustomSlider.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected void updateBar() {
	handleRadius = getDimension(R.dimen.default_slider_handler_radius);
	barHeight = getDimension(R.dimen.default_slider_bar_height);
	barOffsetX = handleRadius;

	if (bar == null)
		createBitmaps();
	drawBar(barCanvas);
	invalidate();
}
 
Example #4
Source File: AbsCustomSlider.java    From timecat with Apache License 2.0 5 votes vote down vote up
protected void updateBar() {
	handleRadius = getDimension(R.dimen.default_slider_handler_radius);
	barHeight = getDimension(R.dimen.default_slider_bar_height);
	barOffsetX = handleRadius;

	if (bar == null)
		createBitmaps();
	drawBar(barCanvas);
	invalidate();
}
 
Example #5
Source File: AbsCustomSlider.java    From droidddle with Apache License 2.0 5 votes vote down vote up
protected void updateBar() {
    handleRadius = getDimension(R.dimen.default_slider_handler_radius);
    barHeight = getDimension(R.dimen.default_slider_bar_height);
    barOffsetX = handleRadius;

    if (bar == null)
        createBitmaps();
    drawBar(barCanvas);
}
 
Example #6
Source File: ColorPickerDialogBuilder.java    From droidddle with Apache License 2.0 5 votes vote down vote up
private ColorPickerDialogBuilder(Context context) {
    builder = new AlertDialog.Builder(context);
    pickerContainer = new LinearLayout(context);
    pickerContainer.setOrientation(LinearLayout.VERTICAL);
    pickerContainer.setGravity(Gravity.CENTER_HORIZONTAL);
    defaultMargin = getDimensionAsPx(context, R.dimen.default_slider_margin);

    LinearLayout.LayoutParams layoutParamsForColorPickerView = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0);
    layoutParamsForColorPickerView.weight = 1;
    colorPickerView = new ColorPickerView(context);

    pickerContainer.addView(colorPickerView, layoutParamsForColorPickerView);

    builder.setView(pickerContainer);
}