【问题标题】:Fragments are not running perfectly in real device片段在真实设备中无法完美运行
【发布时间】:2012-04-02 09:00:32
【问题描述】:

我已经使用片段来定义一个简单的拆分视图,在正确的站点中我使用了一个包含 videoview 的布局,xml 代码是:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <VideoView
        android:id="@+id/tvT"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
         />

</LinearLayout>

在另一个片段布局的左侧站点中,我定义了一些按钮来播放不同的视频,该程序在模拟器中运行良好,但是当我在设备上运行它时,视频视图与整个区域重叠并产生了可怕的外观,我该怎么办?

【问题讨论】:

    标签: java android android-layout android-fragments


    【解决方案1】:

    如果可以,您需要发布更多代码;您发布的内容不足以让人们帮助您。 [编辑:该死,我认为这很简单,可以自动移至对原始问题的评论:-\]

    【讨论】:

      【解决方案2】:

      您可以尝试使用“fill_parent”,因为视频可能太大并且使用孔显示:

      <VideoView
          android:id="@+id/tvT"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
           />
      

      如果可以的话,最好发布一些设置片段的代码。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-02-15
        • 2018-11-21
        • 2014-11-12
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多