我能';在Android Studio中将textview放在我的图像下?
我将此代码用于TextView最简单的方法是添加DrawableTop:我能';在Android Studio中将textview放在我的图像下?,android,Android,我将此代码用于TextView最简单的方法是添加DrawableTop: <TextView android:id="@+id/textView27" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="TextView" /> 我还看到您有0dp宽度和wrap_内容,我假设您
<TextView
android:id="@+id/textView27"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
我还看到您有0dp宽度和wrap_内容,我假设您使用的是布局权重,而不是约束布局。所以请用这个做实验
您还可以添加android:drawablePadding=“dp”将图像中的填充添加到文本中。您应该使用布局您使用的是什么布局?
<TextView
android:id="@+id/textView27"
android:drawableTop="@drawable/yourimage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView" />