Issue #2549 OpenCV Samples does not expand on full screen fixed.

All samples use application style in android manifest instead of system calls in onCreate event now.
This commit is contained in:
Alexander Smorkalov 2012-11-23 13:12:11 +04:00
parent 8579666b03
commit 2c67731a7b
15 changed files with 39 additions and 22 deletions

View File

@ -7,7 +7,8 @@
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity
android:name=".Puzzle15Activity"

View File

@ -13,8 +13,8 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.Window;
import android.view.View;
import android.view.WindowManager;
public class Puzzle15Activity extends Activity implements CvCameraViewListener, View.OnTouchListener {
@ -50,7 +50,7 @@ public class Puzzle15Activity extends Activity implements CvCameraViewListener,
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_puzzle15);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="ColorBlobDetectionActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="FdActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -25,7 +25,6 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
public class FdActivity extends Activity implements CvCameraViewListener {
@ -120,7 +119,6 @@ public class FdActivity extends Activity implements CvCameraViewListener {
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.face_detect_surface_view);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="ImageManipulationsActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -22,7 +22,6 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
public class ImageManipulationsActivity extends Activity implements CvCameraViewListener {
@ -101,7 +100,6 @@ public class ImageManipulationsActivity extends Activity implements CvCameraView
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.image_manipulations_surface_view);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="Sample1Java"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -13,7 +13,6 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
@ -50,7 +49,6 @@ public class Sample1Java extends Activity implements CvCameraViewListener {
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.tutorial1_surface_view);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="Sample2NativeCamera"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -18,7 +18,6 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
public class Sample2NativeCamera extends Activity implements CvCameraViewListener {
@ -63,7 +62,6 @@ public class Sample2NativeCamera extends Activity implements CvCameraViewListene
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.tutorial2_surface_view);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="Sample3Native"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -12,7 +12,6 @@ import org.opencv.imgproc.Imgproc;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
public class Sample3Native extends Activity implements CvCameraViewListener {
@ -52,7 +51,6 @@ public class Sample3Native extends Activity implements CvCameraViewListener {
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.tutorial3_surface_view);

View File

@ -4,7 +4,11 @@
android:versionCode="21"
android:versionName="2.1">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="Sample4Mixed"
android:label="@string/app_name"
android:screenOrientation="landscape"

View File

@ -15,7 +15,6 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
public class Sample4Mixed extends Activity implements CvCameraViewListener {
@ -68,7 +67,6 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener {
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "called onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.tutorial4_surface_view);