[android-developers] A SurfaceView and 2 Buttons on a Layout cannot be displayed?

2009-06-06 Thread fortold

Hi experts,

I have a simple problem which makes me feel like a stupid. I really
need help on this.

I have a SurfaceView which I created with Java code not XML. I created
a MediaPlayer which shows its content on that SurfaceView.

When I use,

setContentView(mPreview); // where mPreview is a SurfaceView

The video is played on the screen.

I need to add two buttons on the screen. So I tried something like
this:

LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.addView(mPreview);

Button btn = new Button(this);
btn.setText(test);

layout.addView(btn);

setContentView(layout);


This did not change anything. Still the video is displayed on full
screen and no buttons appear. I am a java programmer both SE and ME.
Things are done in this way on Java.

Does Android have a different approach?


I will be gratefull if you can help me.

Thanks in advance,
fortold


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: A SurfaceView and 2 Buttons on a Layout cannot be displayed?

2009-06-06 Thread fortold

Jusung and Mark,

Thank you very much for your valuable comments. The problem is now
solved.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problem with HTTP video stream

2009-04-12 Thread fortold

Did anyone try HTTP video streaming on the emulator?

I used the api example provided with the SDK (android-sdk-
windows-1.1_r1\samples\ApiDemos\src\com\example\android\apis\media)

I changed the path to something like http://foo.com/bar.3gp; however
all I get is a meaningless error message:
Prepare failed: status=0x 

Since the example is provided by the SDK itself, I count the code as a
correct one.

Thus I got tho questions:

1) Can the emulator play video files?
2) If it can, what are the restrictions? (file types, frame rates
etc...)

Any help will be appreciated.

Thanks in advance

fortold

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---