- ProgressBar on top of FrameLayout
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/RelativeLayout01"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
- <FrameLayout
- android:id="@+id/gl_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true" >
- </FrameLayout>
- <SurfaceView
- android:id="@+id/surface"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_centerInParent="true" >
- </SurfaceView>
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/controlContainer"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:background="#aa000000"
- android:orientation="vertical"
- android:padding="10dp" >
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:orientation="horizontal" >
- <ToggleButton
- android:id="@+id/buttonPausePlay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/selector_play_pause"
- android:textOff=""
- android:textOn="" />
- <ImageButton
- android:id="@+id/buttonStop"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="#00000000"
- android:src="@drawable/ic_media_stop" />
- </LinearLayout>
- <ProgressBar
- android:id="@+id/seekbar"
- style="@android:style/Widget.ProgressBar.Horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:enabled="false"
- android:indeterminate="false" />
- </LinearLayout>
- <LinearLayout
- android:id="@+id/loadingContainer"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:gravity="center"
- android:orientation="vertical" >
- <ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.ProgressBar.Large.Inverse"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:indeterminate="true" />
- </LinearLayout>
- </RelativeLayout>
- @Override
- public void onBuffering(int progress_in_percent) {
- Log.d(TAG, "Buffering " + progress_in_percent + " %");
- }
- @Override
- public void onBufferingBegin() {
- Log.d(TAG, "Buffering begin");
- loadingContainer.setVisibility(View.VISIBLE);
- }
- @Override
- public void onBufferingEnd() {
- Log.d(TAG, "Buffering end");
- loadingContainer.setVisibility(View.GONE);
- }