【发布时间】:2017-08-08 10:12:59
【问题描述】:
我只是想将图标设置在我的TextView 的左上角。
这是我的代码和输出:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Content"
android:drawableLeft="@drawable/icon" />
输出:
但我想像这样将我的图标设置在顶部和左侧:
【问题讨论】:
-
使用单一视图不容易做到这一点,您可能必须使用相对布局和单独的图像视图。
-
使用重力并设置它
-
@jigarsavaliya 你能解释更多吗?