【问题标题】:On touch video view set as fullscreen in tablet在平板电脑中设置为全屏的触摸视频视图
【发布时间】:2012-09-03 06:38:10
【问题描述】:

我是 android 新手,正在开发一个 Android 小应用程序。

在我的应用中,当我在触摸时拉伸视频视图时正在播放视频,它应该设置为全屏。有没有人可以建议一下,怎么做。

【问题讨论】:

  • 你能展示一下你的布局是如何设计的吗?
  • 刚刚给出 videoview height=251dp 和 weidth=490
  • 触摸或拉伸,设置为全屏
  • 为什么要硬编码视频视图?

标签: android android-layout android-intent android-emulator


【解决方案1】:

//将你的父布局设置为Relativelayout

<VideoView android:id="@+id/videoview"
             android:layout_width="fill_parent"
             android:layout_alignParentRight="true"
             android:layout_alignParentLeft="true"
             android:layout_alignParentTop="true"
             android:layout_alignParentBottom="true"
             android:layout_height="fill_parent">
    </VideoView>

//这里的alignparent属性是重要的作用。

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

【讨论】:

  • 我希望视频应该在角落播放,触摸它应该是全屏
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-04
  • 2017-05-02
  • 1970-01-01
相关资源
最近更新 更多