linjzong / androidproject Goto Github PK
View Code? Open in Web Editor NEW存放Android项目
存放Android项目
getSupportedPreviewSize
不同手机 有的是 小到大
, 有的是 大到小
, 有的是 乱序
setDisplayOrientation(90)
这种写法是错误的,
不是 所有手机 竖屏
拍照 就一定是 90
.
我的 LG Nexus 5X
就是 270
.
Camera.parameter.setRotation()
也是同理.
等等....
I guess there is a reset image trans after Zoom in:
/**
* 重置图片位置
* */
float dx = 0;
float dy = 0;
float width = getWidth();
float height = getHeight();
mCurrentMatrix.set(getImageMatrix());//初始化Matrix
float[] values = new float[9];
mCurrentMatrix.getValues(values);
if (values[Matrix.MTRANS_X] > 0) {
dx = -values[Matrix.MTRANS_X];
} else if (values[Matrix.MTRANS_X] < -(mImageWidth * values[Matrix.MSCALE_X] - width)) {
dx = -(mImageWidth * values[Matrix.MSCALE_X] - width) - values[Matrix.MTRANS_X];
}
if (values[Matrix.MTRANS_Y] > 0) {
dy = -values[Matrix.MTRANS_Y];
} else if (values[Matrix.MTRANS_Y] < -(mImageHeight * values[Matrix.MSCALE_Y] - height)) {
dy = -(mImageHeight * values[Matrix.MSCALE_Y] - height) - values[Matrix.MTRANS_Y];
}
mCurrentMatrix.postTranslate(dx, dy);
setImageMatrix(mCurrentMatrix);
Doing this is for reset picture trans which out of bounds during zoom in.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.