只显示按钮,但我想看到按钮上方的文字
<RelativeLayout
android:id="@+id/big_button_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ImageButton
android:id="@+id/big_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/girrafffe"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:text="Hello"
android:layout_above="@id/big_button"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
小智 6
<Button
android:id="@+id/button_send"
android:layout_width="150px"
android:layout_height="wrap_content"
android:padding="20dp"
android:drawableBottom="@drawable/image"
android:background="@android:color/transparent"
android:text="@string/send"
android:gravity="center"
android:layout_gravity="center"
/>
Run Code Online (Sandbox Code Playgroud)
android:drawableBottom="@drawable/image" 将按钮的图像放在底部,从而允许将文本放在顶部.
| 归档时间: |
|
| 查看次数: |
4275 次 |
| 最近记录: |