ImageView:铺满父元素

<ImageView        android:id="@+id/iv_fragment_showImage"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:scaleType="fitXY"        android:visibility="gone"/>

在布局中添加

android:scaleType="fitXY"

VideoView:铺满父元素

    <RelativeLayout         android:layout_width="match_parent"        android:layout_height="match_parent" >    <VideoView        android:id="@+id/vv_fragment_showVideo"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:layout_alignParentLeft="true"        android:layout_alignParentRight="true"        android:layout_alignParentTop="true"        android:layout_alignParentBottom="true"        android:visibility="gone"/>    RelativeLayout>

在VideoView为添加一个RelativeLayout,铺满父元素,并在VideoView中添加4个属性:

        android:layout_alignParentLeft="true"        android:layout_alignParentRight="true"        android:layout_alignParentTop="true"        android:layout_alignParentBottom="true"

更多相关文章

  1. Android studio中相对布局组件排列方式
  2. RelativeLayout布局属性
  3. android 界面布局-各个布局的属性介绍
  4. android view的几种布局方式
  5. Android 五种布局简单介绍
  6. Android Layout Tricks #2: Reusing layouts(Android 布局技巧2:重
  7. 35、键盘布局的tableLayout备份
  8. 相对布局RelativeLayout
  9. android布局ui

随机推荐

  1. 日积月累--exception记录
  2. 图片加载和处理的又一个神器 Fresco 的使
  3. Google Android开发精华教程【转】
  4. Android(安卓)数独游戏 记录
  5. Android学习笔记(8) - GridView与ImageVi
  6. android 之View 一
  7. android中Menu介绍
  8. 6.22 android计算字符高度宽度,红蓝3D图片
  9. 由 Sense 4.0 说开去: Android 第三方定制
  10. Android程序开发初级教程(一)