Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use this code without a dialog box, just in activity? #100

Open
Sterkhov96 opened this issue Jun 22, 2018 · 2 comments
Open

How can I use this code without a dialog box, just in activity? #100

Sterkhov96 opened this issue Jun 22, 2018 · 2 comments

Comments

@Sterkhov96
Copy link

How can I use this code without a dialog box, just in activity

@Shadow1356
Copy link

Shadow1356 commented Jun 22, 2018

Simply add this to your XML:
<com.flask.colorpicker.ColorPickerView android:id="@+id/static_color_picker" android:layout_width="match_parent" android:layout_height="700dp" android:layout_marginLeft="20dp" app:alphaSlider="true" app:lightnessSlider="true" app:wheelType="CIRCLE" />

Then in your Java activity, colorPicker = findViewById(R.id.static_color_picker);
Then you can add a Listener to it: colorPicker.addOnColorSelectedListener(colorListener());
And do whatever you want in the listener.

@Shadow1356
Copy link

There should be some newlines in that xml, but Github won't let me :(

Hopefully you get the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants