亦行之 2024-04-10 11:20 采纳率: 34.5%
浏览 6

Android开发布局文件中不显示


<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
    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:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".activity.Places_details_Activity">
<androidx.appcompat.widget.Toolbar
    android:id="@+id/details_toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/my_light_primary"
    app:titleTextColor="@color/white"
    app:navigationIcon="@drawable/baseline_arrow_back_24"
    app:title="详情"
    tools:ignore="MissingConstraints" />
    <ImageView
        android:id="@+id/pic1"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:layout_marginTop="20dp"
        android:src="@drawable/lb_1"
        android:scaleType="centerCrop"
        />
    <TextView
        android:id="@+id/name1"
        android:layout_margin="10dp"
        android:layout_width="match_parent"
        android:text="****"
        android:layout_height="wrap_content"/>

</androidx.appcompat.widget.LinearLayoutCompat>

以上是我的xml文件,但是运行时并未显示imageview控件和textview控件是为什么

img

  • 写回答

6条回答 默认 最新

  • 专家-赤兔[在线] 全栈领域优质创作者 2024-04-10 11:20
    关注

    引自免费微信小程序:皆我百晓生

    非常抱歉,由于您的描述并不清晰,我难以确定您在哪个方面遇到了问题。如果您能提供更多的信息,例如在哪个位置看不到图片或者哪些部分看不到文本,那么我可以更好地帮助您。

    然而,根据您的描述,看起来似乎是在Android开发中遇到的问题。在这种情况下,可能的原因有很多,比如布局问题、资源加载错误等。为了确定具体原因,我们需要查看更具体的代码片段或者更详细的日志。

    如果我找到了问题所在,并且有相应的解决方案,我会立即为您分享。在此期间,您可以暂时忽略我的回答,因为我在等待您的反馈。如果您有任何其他问题,随时向我提问。

    谢谢您提供的信息。我会尽力帮到您的!

    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 4月10日

悬赏问题

  • ¥20 python忆阻器数字识别
  • ¥15 无法输出helloworld
  • ¥15 高通uboot 打印ubi init err 22
  • ¥20 PDF元数据中的XMP媒体管理属性
  • ¥15 R语言中lasso回归报错
  • ¥15 网站突然不能访问了,上午还好好的
  • ¥15 有没有dl可以帮弄”我去图书馆”秒选道具和积分
  • ¥15 semrush,SEO,内嵌网站,api
  • ¥15 Stata:为什么reghdfe后的因变量没有被发现识别啊
  • ¥15 振荡电路,ADS仿真