Skip to content

When i get mSelectedColor in dialog.setOnColorSelectedListener ,color = mColors[ ? ]? #13

@ghost

Description

    int[] mColors = getResources().getIntArray(R.array.default_rainbow);

    ColorPickerDialog dialog = ColorPickerDialog.newInstance(R.string.color_picker_default_title,
            mColors,
            mSelectedColor,
            5, // Number of columns
            ColorPickerDialog.SIZE_SMALL,
            true // True or False to enable or disable the serpentine effect
            //0, // stroke width
            //Color.BLACK // stroke color
    );

    dialog.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener() {

        @Override
        public void onColorSelected(int color) {
            mSelectedColor = color;
            textView.setTextColor(mSelectedColor);
            Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
            startActivity(intent);
        }

    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions