我想在 android 上实现以下设计,D 是图像或字符。文本应按照设计中所述正确对齐。有什么建议吗?
我尝试使用 TextView 的左侧可绘制对象、单选按钮和复选框的自定义图标,但文本对齐是个问题。 提前致谢。
最佳答案
试试这个,它会给你同样的结果
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" />
关于android - 文本与设计中提到的图像对齐 - Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42342127/