public class NacColorPickerDialog extends NacDialog implements android.widget.TextView.OnEditorActionListener, android.text.TextWatcher, android.view.View.OnTouchListener, NacDialog.OnShowListener
NacDialog.OnBuildListener, NacDialog.OnCancelListener, NacDialog.OnDismissListener, NacDialog.OnHideListener, NacDialog.OnNeutralActionListener, NacDialog.OnShowListener, NacDialog.Scaler
Constructor and Description |
---|
NacColorPickerDialog() |
Modifier and Type | Method and Description |
---|---|
void |
afterTextChanged(android.text.Editable s)
Ensure the text always starts with "#".
|
void |
beforeTextChanged(java.lang.CharSequence seq,
int start,
int count,
int after)
Note: This is required to implement TextWatcher.
|
boolean |
canParseColor(java.lang.String name) |
int |
getColor() |
java.lang.String |
getEditTextColor() |
java.lang.String |
getHexColor() |
boolean |
isHexString(java.lang.String name)
Check if valid hex string was input into the EditText.
|
void |
onBuildDialog(android.content.Context context,
android.app.AlertDialog.Builder builder)
Build the dialog.
|
boolean |
onEditorAction(android.widget.TextView tv,
int action,
android.view.KeyEvent event)
Close the keyboard when the user hits enter.
|
void |
onShowDialog(NacDialog dialog,
android.view.View root)
Setup the views when the dialog is shown.
|
void |
onTextChanged(java.lang.CharSequence seq,
int start,
int before,
int count)
Note: This is required to implement TextWatcher.
|
boolean |
onTouch(android.view.View view,
android.view.MotionEvent event)
Capture touch events on the color picker.
|
void |
setColor(int color)
Set the color.
|
addOnCancelListener, addOnDismissListener, addOnHideListener, addOnNeutralActionListener, addOnShowListener, build, build, build, calculateDialogHeight, calculateDialogWidth, callOnCancelListeners, callOnDismissListeners, callOnNeutralActionListeners, cancel, cancelDialog, canCloseDialog, closeKeyboard, dismiss, dismissDialog, getAlertDialog, getBuilder, getContext, getData, getDataBoolean, getDataFloat, getDataInt, getDataString, getId, getLayoutId, getRoot, getWindow, hide, neutral, neutralDismiss, onCancel, onClick, onClick, onLayoutChange, saveData, scale, setId, setLayoutId, setNegativeButton, setNeutralButton, setOnBuildListener, setPositiveButton, setupDialog, show, showKeyboard, wasCanceledOrDismissed
public void afterTextChanged(android.text.Editable s)
afterTextChanged
in interface android.text.TextWatcher
public void beforeTextChanged(java.lang.CharSequence seq, int start, int count, int after)
beforeTextChanged
in interface android.text.TextWatcher
public boolean canParseColor(java.lang.String name)
public int getColor()
public java.lang.String getEditTextColor()
public java.lang.String getHexColor()
public boolean isHexString(java.lang.String name)
public void onBuildDialog(android.content.Context context, android.app.AlertDialog.Builder builder)
onBuildDialog
in class NacDialog
public boolean onEditorAction(android.widget.TextView tv, int action, android.view.KeyEvent event)
onEditorAction
in interface android.widget.TextView.OnEditorActionListener
public void onShowDialog(NacDialog dialog, android.view.View root)
onShowDialog
in interface NacDialog.OnShowListener
public void onTextChanged(java.lang.CharSequence seq, int start, int before, int count)
onTextChanged
in interface android.text.TextWatcher
public boolean onTouch(android.view.View view, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
public void setColor(int color)