Here is my on create
Using java Syntax Highlighting
- @Override
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- this.setContentView(R.layout.video_test);
- SurfaceView v = (SurfaceView) findViewById(R.id.surface_video);
- SurfaceHolder holder = v.getHolder();
- // Set the transparency
- getWindow().setFormat(PixelFormat.UNKNOWN);
- // Set a size for the video screen
- holder.addCallback(this);
- holder.setFixedSize(400,300);
- MediaPlayer mp = MediaPlayer.create(this, R.raw.fiat);
- mp.setDisplay(holder);
- try {
- mp.prepare();
- mp.start();
- } catch (IllegalStateException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
here is my test layout
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
- <SurfaceView android:id="@+id/surface_video"
- android:layout_width="250px"
- android:layout_height="250px">
- </SurfaceView>
- <LinearLayout
- android:orientation="horizontal"
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:padding="10dip"
- >
- </LinearLayout>
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4

