You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<com.james602152002.floatinglabeledittext.FloatingLabelEditText
//set focus status color
app:j_fle_colorHighlight="#0000FF"
//set divider color when you are not in focus status
app:j_fle_colorDivider="#FF00FF"
//set error status color
app:j_fle_colorError="#0000FF"
//set label text and hint
app:j_fle_hint="label"
//set thickness of divider
app:j_fle_thickness="2dp"
//set label horizontal margin
app:j_fle_label_horizontal_margin="2dp"
//set label vertical margin
app:j_fle_label_vertical_margin="2dp"
//ser error text horizontal margin
app:j_fle_error_horizontal_margin="2dp"
//set divider vertical margin
app:j_fle_divider_vertical_margin="2dp"
//set floating label text size
app:j_fle_label_textSize="14sp"
//set error text size
app:j_fle_error_textSize="14sp"
//set floating label animation duration(unit:ms)
app:j_fle_float_anim_duration="800"
//set error sliding text animation duration(unit:ms)
app:j_fle_error_anim_duration="8000"
//validate error mode disable(default enabled)
app:j_fle_error_disable="true"
//enable multiline mode(default disabled)
app:j_fle_multiline_mode_enable="true"
//enable clear button mode(default disabled)
app:j_fle_enable_clear_btn="true"
//set clear button size
app:j_fle_clear_btn_size="10dp"
//set clear button color
app:j_fle_clear_btn_color="#FF0000"
//set clear button horizontal margin
app:j_fle_clear_btn_horizontal_margin="2dp"
//set clear button drawable or vector drawable id
app:j_fle_clear_btn_id = "@drawable/icon"
//Even your edit text doesn't have focus, your clear button still show at right.(default invisible) app:j_fle_show_clear_btn_without_focus="true" //display your current and max text length(default invisible) app:j_fle_show_text_length="true" //set text length display color(default highlight_color) app:j_fle_text_length_display_color="#00FFFF" />
Method
publicvoidsetting(){
//set focus status colorsetHighlightColor(intcolor);
//set divider color when you are not in focus statussetDivider_color(intdivider_color);
//set error status colorsetError_color(interror_color);
//set label text and hintsetLabel(CharSequencehint);
//set thickness of dividersetThickness(intthickness);
//set label horizontal and vertical marginsetLabelMargins(inthorizontal_margin, intvertical_margin);
//ser error text horizontal marginsetErrorMargin(inthorizontal_margin);
//set divider vertical marginsetDivider_vertical_margin(intdivider_vertical_margin);
//set floating label text sizesetLabel_text_size(floatlabel_text_size);
//set error text sizesetError_text_size(floaterror_text_size);
//set floating label animation duration(unit:ms)setAnimDuration(intANIM_DURATION);
//set error sliding text animation duration(unit:ms)setErrorAnimDuration(intERROR_ANIM_DURATION);
//enable error modesetError_enabled();
//disable error modesetError_disabled();
//enable multiline mode(default disabled)setMultiline_mode(booleanenable);
//enable clear button mode(default disabled)enableClearBtn(booleanenable);
//set clear button sizesetClear_btn_size(intclear_btn_size);
//set clear button colorsetClear_btn_color(intclear_btn_color);
//set clear button horizontal marginsetClear_btn_horizontal_margin(intclear_btn_horizontal_margin);
//customize your clear button by ttfcustomizeClearBtn(Typefacetypeface, Stringuni_code, intcolor, intclear_btn_size);
//customize png or VectorDrawable clear buttoncustomizeClearBtn(intdrawableId, intclear_btn_width);
//Even your edit text doesn't have focus, your clear button still show at right.showClearButtonWithoutFocus();
//display your current and max text length(default invisible)showMaxTextLength(booleanshow);
//set text length display color(default highlight_color)setText_length_display_color(inttext_length_display_color);
}