TextView中不显示,直到VideoView开始播放 [英] TextView is not Displayed until VideoView start playing
问题描述
我写了有两个视图一个Android应用程序,VideoView上面TextView的(这是一个滚动型中),我遇到了,直到VideoView开始播放视频,不显示TextView的问题,我有一个blackscreen和这可能需要很长的时间,因为该命令来启动视频从客户端通过RPC接收。可能有人请帮助,无论是通过编辑main.xml中或使用code指向的问题?
I wrote an android application which has to two views, VideoView above TextView(which is inside a ScrollView), I met a problem that until the VideoView starts playing a video, the TextView is not displayed and I have a blackscreen, and this might take a long time, since the command to start the video is received from a client via RPC. Could someone please help pointing the problem, either by editing main.xml or using code?
我的main.xml:
My main.xml:
<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:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/videoview"
/>
<ScrollView
android:id="@+id/ScrollView01"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<TextView
android:layout_width="wrap_content"
android:id="@+id/textview"
android:layout_height="wrap_content"
android:text="Wellcome"
/>
</ScrollView>
</LinearLayout>
在我的活动进口仅为:
And the import in my activity is only:
setContentView(R.layout.main);
在先进的感谢,
本雅明
推荐答案
我不觉得你将不得不使用相对布局这样的问题。
i don't think u will have problem in using relative layout like this
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<VideoView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/videoview"
android:layout_above="@+id/ScrollView01"
/>
<ScrollView
android:id="@+id/ScrollView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
>
<TextView
android:layout_width="wrap_content"
android:id="@+id/textview"
android:layout_height="wrap_content"
android:text="Wellcome"
/>
</ScrollView>
</RelativeLayout>
这篇关于TextView中不显示,直到VideoView开始播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!