public void setLayout(int width, int heitht){
this.height = heitht;
this.width = width;
- gLogger.error("SurfacedCreated, screen size w: " + SCREEN_WIDTH + ", h:" + SCREEN_HEIGHT + ". preview size, w: " + width + ", h: " + height);
+ gLogger.error("setLayout, screen size w: " + SCREEN_WIDTH + ", h:" + SCREEN_HEIGHT + ". preview size, w: " + width + ", h: " + height);
float ratio = (float) height / width; // 3/4,,, 640x480 1008x1344
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams)getLayoutParams();
lp.leftMargin = 0;
lp.topMargin = (SCREEN_HEIGHT - lp.height) / 2;
}
+ gLogger.error("width=" + lp.width + ", height=" + lp.height + ". leftMargin=" + lp.leftMargin + ", topMargin=" + lp.topMargin);
this.setLayoutParams(lp);
}
AsyncTask<Void, Integer, Boolean> mailTask = new AsyncTask<Void, Integer, Boolean>() {
- //private String zfile = DIR + File.separator + "log.zip";
private String zfile = mContext.getExternalCacheDir() + File.separator + "log.zip";
-
-
@Override
protected Boolean doInBackground(Void... voids) {
} else {
display.getSize(outPoint); // exclude navigation bar
}
- if(outPoint.y > outPoint.x) {
+ size.width = outPoint.x;
+ size.height = outPoint.y;
+
+ /*if(outPoint.y > outPoint.x) {
size.height = outPoint.y;
size.width = outPoint.x;
} else {
size.height = outPoint.x;
size.width = outPoint.y;
- }
+ }*/
return size;
}
- //DisplayMetrics outMetrics = new DisplayMetrics();
- //this.getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
-
- //CameraView.SCREEN_WIDTH = outMetrics.widthPixels;
- //CameraView.SCREEN_HEIGHT = outMetrics.heightPixels;
- //gLogger.debug("Screen size is w: " + CameraView.SCREEN_WIDTH + ", h: " + CameraView.SCREEN_HEIGHT);
+// DisplayMetrics outMetrics = new DisplayMetrics();
+// this.getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
+//
+// CameraView.SCREEN_WIDTH = outMetrics.widthPixels;
+// CameraView.SCREEN_HEIGHT = outMetrics.heightPixels;
+// gLogger.debug("Screen size is w: " + CameraView.SCREEN_WIDTH + ", h: " + CameraView.SCREEN_HEIGHT);
ScreenSize size = getScreenSize();
--- /dev/null
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/action_settings"
+ android:orderInCategory="100"
+ android:showAsAction="never"
+ android:title="setting"/>
+
+</menu>
\ No newline at end of file