2017-02-20 1 views
1

다음 디자인을 Android에서 구현하고 싶습니다. D는 이미지 또는 문자입니다. 텍스트는 디자인에서 언급 한대로 올바르게 정렬되어야합니다. 어떤 제안? 디자인에서 언급 한 이미지와 텍스트 정렬

enter image description here

내가 텍스트 뷰의 왼쪽 당김을 사용하여 그것을 시도, 라디오 버튼과 체크 박스하지만 텍스트 정렬의 사용자 정의 아이콘이 문제입니다. 미리 감사드립니다.

+3

다음을 확인하십시오 : http://stackoverflow.com/questions/19030843/how-to-make-the-first-character-much-larger-than-other-in-a-textview –

+0

동일한 텍스트를 사용할 수 있습니다 결과. –

답변

3

https://github.com/rpradal/Lettrine

당신의 Gradle을 사용하면 XML에서

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

을이 추가 단지

<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

,691 추가는 동일한 결과를 당신에게 줄 것이다이 하나를 시도
관련 문제