bigname22 2016-11-02 08:38 采纳率: 15.4%
浏览 2885

为什么我的子控件textview超出了父布局仍能够显示?

图片说明
看图,预想是不能够显示上面aaa这些的文字的,但是结果这些文字都能够显示的了,
就好像是把我的textview的高度修改成不超过父布局的高度了,请问是为什么?
布局如下:

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.administrator.viewworkingreason10.MainActivity">

    <RelativeLayout
        android:layout_width="200dp"
        android:layout_centerInParent="true"
        android:background="@color/colorAccent"
        android:layout_height="50dp">
            <TextView
                android:background="@color/colorPrimary"
                android:src="@drawable/tieta2"
                android:id="@+id/iv"
                android:layout_gravity="bottom"
                android:layout_width="100dp"
                android:text="aaabbbccc"
                android:layout_height="100dp" />
    </RelativeLayout>
</RelativeLayout>
  • 写回答

3条回答 默认 最新

  • qq_24800377 2016-11-02 08:51
    关注

    没有代码,只有你的模拟图,我只能说这种情况不可能,出现是有原因的,方便将布局代码贴出来么?

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料