2017-02-20 66 views
1

我想在android上實現以下設計,D可以是圖像或字符。文本應該像設計中提到的那樣正確對齊。有什麼建議麼?設計中提到的圖像與文本對齊 - Android

enter image description here

我嘗試了使用的TextView的左側繪製,單選按鈕,複選框,但文本對齊方式的自定義圖標是一個問題。 在此先感謝。

+3

選中此項:http://stackoverflow.com/questions/19030843/how-to-make-the-first-character-much-larger-than-other-in-a-textview –

+0

您可以使用spannable文本相同結果。 –

回答

3

試試這個,它會給你同樣的結果

https://github.com/rpradal/Lettrine

在gradle這個

compile 'com.github.rpradal.lettrine:lettrine:release_number' 

在你的XML添加這只是添加

<com.github.rpradal.lettrine.LettrineTextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       app:lettrine_textColor="@android:color/holo_red_dark" 
       app:lettrine_text="Lorem ipsum" 
       app:lettrine_lettrineSize="3" 
       app:lettrine_textSize="14sp" /> 

enter image description here