我如何在ImageButton上显示文本?

问题描述 投票:-2回答:1

我想为我的应用创建这种类型的布局,有人可以帮助我吗?我如何创建这种类型的布局。

Layout screen shot ,please check it

android android-layout android-linearlayout
1个回答
0
投票

尝试一下:

 <FrameLayout>
        <ImageButton
            android:id="@+id/button"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@null"
            android:src="@drawable/button_image" >
        </ImageButton>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:clickable="false"
            android:text="Text" >
        </TextView>
    </FrameLayout>
© www.soinside.com 2019 - 2024. All rights reserved.