![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
com.github.yukuku:ambilwarna
Advanced tools
Android Color Picker aka AmbilWarna library ("Pick a Color" in Indonesian)
aka AmbilWarna
library ("Pick a Color" in Indonesian)
moved from http://code.google.com/p/yuku-android-util/
This is a small library for your application to enable the users to select an arbitrary color. It is used in the free Bible applications for Android (http://www.bibleforandroid.com).
It is also used by:
If your application has a feature to customize the color of some background, text, or maybe for a painting application where the user can select different colors for painting or filling, then AmbilWarna
is suitable for you.
Android Studio 3.0 and above:
dependencies {
implementation 'com.github.yukuku:ambilwarna:2.0.1'
}
Android Studio 2.3.* and lower:
dependencies {
compile 'com.github.yukuku:ambilwarna:2.0.1'
}
Create a color picker dialog by calling the following constructor, and then show it.
AmbilWarnaDialog(Context context, int color, OnAmbilWarnaListener listener)
Alpha is also supported by passing the 3rd parameter supportsAlpha
:
AmbilWarnaDialog(Context context, int color, boolean supportsAlpha, OnAmbilWarnaListener listener)
Example:
// initialColor is the initially-selected color to be shown in the rectangle on the left of the arrow.
// for example, 0xff000000 is black, 0xff0000ff is blue. Please be aware of the initial 0xff which is the alpha.
AmbilWarnaDialog dialog = new AmbilWarnaDialog(this, initialColor, new OnAmbilWarnaListener() {
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
// color is the color selected by the user.
}
@Override
public void onCancel(AmbilWarnaDialog dialog) {
// cancel was selected by the user
}
dialog.show();
Very simple. It works like a DialogPreference
that stores an Integer to the shared preferences file.
Just add the following to the preferences xml file.
<yuku.ambilwarna.widget.AmbilWarnaPreference
android:key="your_preference_key"
android:defaultValue="0xff6699cc"
android:title="Pick a color" />
To enable alpha, use the application attribute supportsAlpha
, as follows:
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<yuku.ambilwarna.widget.AmbilWarnaPreference
android:key="your_preference_key"
android:defaultValue="0xff6699cc"
app:supportsAlpha="true"
android:title="Pick a color with alpha" />
</PreferenceScreen>
FAQs
Android Color Picker aka AmbilWarna library ("Pick a Color" in Indonesian)
We found that com.github.yukuku:ambilwarna demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.