【发布时间】:2015-02-08 19:48:32
【问题描述】:
好的,所以我正在尝试用单行文本制作图像网格(材料设计指南)。单行指南:
单行页眉/页脚
高度:48dp
文本内边距:16dp
默认字体大小:16sp
我这样做的方式使文本被截断,考虑到 16 的文本和组合的填充为 32,这是有道理的:
我使用了 android:padding = 16dp,但我可能误解了指南。有人可以帮忙澄清一下。提前致谢。
编辑:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.project.SquareImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="bottom"
android:background="#40000000"
android:padding="16dp"
android:textColor="@android:color/white"
android:textSize="16sp" />
</FrameLayout>
【问题讨论】:
-
请提供布局。
-
我已经编辑了原帖。
标签: android gridview material-design