68.TextView設置中劃線、下劃線

android:textAppearance
設置文字外觀。如「?android:attr/textAppearanceLargeInverse
」這裏引用的是系統自帶的一個外觀,?表示系統是否有這種外觀,不然使用默認的外觀。可設置的值以下:textAppearanceButton/textAppearanceInverse/textAppearanceLarge/textAppearanceLargeInverse/textAppearanceMedium/textAppearanceMediumInverse/textAppearanceSmall/textAppearanceSmallInverse

textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下劃線

textView.getPaint().setAntiAlias(true);//抗鋸齒

textview.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG); //中劃線

setFlags(Paint. STRIKE_THRU_TEXT_FLAG|Paint.ANTI_ALIAS_FLAG);  // 設置中劃線並加清晰 

textView.getPaint().setFlags(0);  // 取消設置的的劃線


如題:android




相關文章
相關標籤/搜索