首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在android Studio中将图片视图放在最上面?

如何在android Studio中将图片视图放在最上面?
EN

Stack Overflow用户
提问于 2017-12-25 19:12:05
回答 3查看 708关注 0票数 0

正如它在安卓工作室中显示的那样,它看起来非常好,但每当我在手机上运行这个应用程序时,它看起来就像这样,请问你有什么想法??the app on the phone and the android studio

EN

Stack Overflow用户

发布于 2021-03-06 12:22:43

只需将代码图像视图移到顶部即可

示例

代码语言:javascript
运行
复制
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".MainActivity">

    <ImageView
        android:layout_width="200dp"
        android:layout_height="600dp"
        android:src="@drawable/test"/>

    <ProgressBar
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:id="@+id/progressbar"
        android:layout_centerInParent="true"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_notes"
        android:layout_width="250dp"
        android:layout_height="match_parent"
        tools:listitem="@layout/item_note"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab_add"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_margin="16dp"
        android:src="@drawable/button"
        app:borderWidth="1dp"
        app:elevation="9dp"
        android:backgroundTint="#FFFFFF"/>
</RelativeLayout>
票数 0
EN
查看全部 3 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47968059

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档