I have an application and in my layout (see xml below)there are VideoView
and TextView
(same application from my question here, but with a few changes in layout).The TextView
is displayed and scrolls fine, but now the video is not displayed when I tried to start it. What am I doing wrong?
<?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:id="@+id/videoview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/textview"
/>
<TextView
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:maxLines="30"
android:text="My test App"
/>
</RelativeLayout>
EDIT: adding some of Java code
My code using it is pretty simple:
setContentView(R.layout.auto);
_mTextView = (TextView)findViewById(R.id.textview);
_mTextView.setLines(30);
_mTextView.setMovementMethod(new ScrollingMovementMethod());
_mVideoView = (VideoView)findViewById(R.id.videoview);
To start the video I use a TCP server and reflection, which work just fine if I remove the TextView