Bug 994456 - Add a preview surface for webrtc in webapps. r=gcp

This commit is contained in:
Wes Johnston 2014-04-11 14:19:12 -07:00
parent 58a1aa493e
commit 52f8065e4c
3 changed files with 9 additions and 9 deletions

View File

@ -1829,7 +1829,7 @@ public abstract class GeckoApp
} else if (mCameraView instanceof TextureView) {
mCameraView.setAlpha(0.0f);
}
RelativeLayout mCameraLayout = (RelativeLayout) findViewById(R.id.camera_layout);
ViewGroup mCameraLayout = (ViewGroup) findViewById(R.id.camera_layout);
// Some phones (eg. nexus S) need at least a 8x16 preview size
mCameraLayout.addView(mCameraView,
new AbsoluteLayout.LayoutParams(8, 16, 0, 0));
@ -1840,7 +1840,7 @@ public abstract class GeckoApp
mCameraOrientationEventListener.disable();
mCameraOrientationEventListener = null;
}
RelativeLayout mCameraLayout = (RelativeLayout) findViewById(R.id.camera_layout);
ViewGroup mCameraLayout = (ViewGroup) findViewById(R.id.camera_layout);
mCameraLayout.removeView(mCameraView);
}

View File

@ -60,13 +60,6 @@
style="@style/FindBar"
android:visibility="gone"/>
<RelativeLayout android:id="@+id/camera_layout"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
</RelativeLayout>
<FrameLayout android:id="@+id/search_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

View File

@ -26,4 +26,11 @@
<include layout="@layout/text_selection_handles"/>
<FrameLayout android:id="@+id/camera_layout"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
</FrameLayout>
</merge>