SimpleDecoratedtext
1.0.0
SimpleDecoratedText를 사용하면 단순하고 아름답고 지능적이며 반응이 좋은 텍스트 뷰를 만들 수 있습니다.
깨끗하고 직관적 인 디자인 - SimpletextView를 사용하면 단일보기로 응용 프로그램을위한 아름다운 텍스트보기를 만들 수 있습니다.
단일 TextView의 모든 것 - TextDecor 클래스는 많은 양의 위치를 제공합니다. 텍스트에 간단한 장식을 추가합니다 : 굵은, 이탈리아, 슈퍼 스크립트 효과가 선택한 텍스트에 클릭 리스너를 추가하고 색상 변경, 그림자 추가 등을 추가합니다.
외부 박스 인터페이스를 구현하여 자신을 추가 할 수있는 특정 장식이 필요한 경우
Performant, 부드럽게 스크롤하는 글꼴 목록 목록에 글꼴 추가 목록에 글꼴을 추가하여 hav in pact on you 스크롤 성능
SimpleDecoratedText로 시작하는 것은 매우 쉽습니다! 프로젝트에 종속성을 추가하고 아래 지침을 따르십시오.
당신은 필요할 것입니다 :
compile ' com.dsdmsa.text:text_decor_V01:0.0.5 '또는
< dependency >
< groupId >com.dsdmsa.text</ groupId >
< artifactId >text_decor_V01</ artifactId >
< version >0.0.5</ version >
< type >pom</ type >
</ dependency > < com .decorator.text.textdecor.PrettyText
android : layout_width = " match_parent "
android : layout_margin = " 10dp "
android : layout_height = " match_parent "
android : id = " @+id/textDecor " /> TextDecor bold = new TextDecor . Builder ()
. decorate ( TextDecor . BOLD )
. build ();
TextDecor fontAndUndeline = new TextDecor . Builder ()
. decorate ( TextDecor . font ( this , "fonts/Roboto-Thin.ttf" ))
. decorate ( TextDecor . UNDERLINE )
. build ();
TextDecor roundRgadient = new TextDecor . Builder ()
. decorate ( TextDecor . setRoundBackground ( 9 , 2 , new LinearGradient ( 0 , 0 , 545 , 545 , Color . CYAN , Color . BLUE , Shader . TileMode . CLAMP ), Color . BLACK ))
. decorate ( TextDecor . BOLD )
. build ();
TextDecor redBack = new TextDecor . Builder ()
. decorate ( TextDecor . BOLD )
. decorate ( TextDecor . setTextColor ( Color . RED ))
. decorate ( TextDecor . setBackground ( Color . BLACK ))
. decorate ( TextDecor . absoluteTextSize ( 50 ))
. build ();
TextDecor shadowCol = new TextDecor . Builder ()
. decorate ( TextDecor . addShadow ( 2 , 2 , 5 , Color . BLACK ))
. decorate ( TextDecor . absoluteTextSize ( 40 ))
. build ();
prettyText = ( PrettyText ) findViewById ( R . id . textDecor ); prettyText . setText (
roundRgadient . withText ( "Lorem Ipsum" ),
fontAndUndeline . withText ( " is simply dummy text" ),
" of the printing and typesetting industry." ,
roundRgadient . withText ( " Lorem Ipsum " ),
"has been the industry's standard dummy text ever since the " ,
redBack . withText ( "1500s" ),
shadowCol . withText ( ", when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the " ),
redBack . withText ( "1960s" ),
" with the release of " ,
bold . withText ( "Letraset" ),
" sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of " ,
roundRgadient . withText ( "Lorem Ipsum" )
); public static Decoration decor ( final int param ){
return new Decoration () {
@ Override
public Object newDecorInstance () {
return new CustomSpan ( param );
}
};
} public static final Decoration STRINKE = new Decoration () {
@ Override
public Object newDecorInstance () {
return new StrikethroughSpan ();
}
};도움이 필요한 경우 SimpledecoratedText github에 문제를 제출하십시오. 물론 버그 수정 또는 변경 사항으로 풀 요청을 제출하십시오.