Android FrameLayout子级的大小大于其父级

Android FrameLayout子级的大小大于其父级,android,layout,view,android-framelayout,Android,Layout,View,Android Framelayout,问题是我的FrameLayout的子draw and show比其父代大,通过查看FrameLayout的源代码,我仍然不知道原因,如果有人知道解决方案或其他细节,请告诉我 有关布局层次结构和快照,请参见下图 FrameLayout(Parent) - FrameLayout(Child, that should NOT be larger than its parent) - View adb外壳转储系统活动顶部: android.widget.LinearLayout{ed38

问题是我的FrameLayout的子draw and show比其父代大,通过查看FrameLayout的源代码,我仍然不知道原因,如果有人知道解决方案或其他细节,请告诉我

有关布局层次结构和快照,请参见下图

FrameLayout(Parent)
  - FrameLayout(Child, that should NOT be larger than its parent)
    - View
adb外壳转储系统活动顶部:

android.widget.LinearLayout{ed38a19 V.E...... ......I. 0,0-1080,1920}
      android.view.ViewStub{c7b9ade G.E...... ......I. 0,0-0,0 #10203aa android:id/action_mode_bar_stub}
      android.widget.FrameLayout{f84c4bf V.E...... ......I. 0,0-1080,1920 #1020002 android:id/content}
        com..startup.VideoBaseLayout{d290df4 V.E...... ......I. 0,0-1080,1920}
          com..view.PaddingFrameLayout{a4aeddb V.E...... ......I. 0,0-1080,1620}
            com..view.PlayerViewSurface{a436351 V.E...C.. ......I. 0,-1179-1080,2799}
              android.view.SurfaceView{89a27b6 V.E...... ......I. 0,0-1080,3978}
              android.widget.ImageView{e808cb7 G.ED..... ......I. 0,0-0,0}
          android.widget.TextView{f3e2b89 V.ED..C.. ......I. 804,48-1032,145}

@Alex Wang发布您的xml@Charuක 我在运行时通过java代码而不是xml添加这些视图。孩子没有设置LayoutParameter,父亲在宽度和高度上都是MATCH_PARENT。当您运行应用程序时,adb shell dumpsys activity top的输出是什么?@pskink抱歉,我没有领会要点。在您的终端上运行adb shell dumpsys activity top,该命令的输出是什么?