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

为什么我的子控件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
    关注

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

    评论

报告相同问题?