d-clock / androidstudycode Goto Github PK
View Code? Open in Web Editor NEW关于Android的一些原理学习和代码实现
关于Android的一些原理学习和代码实现
在华为 C8816,android 4.3 上,会报空指针异常。
经过断点调试,发现是 mCapturePhotoHelper
为 null
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.i(TAG, "requestCode: " + requestCode + " resultCode: " + resultCode + " data: " + data);
if (requestCode == CapturePhotoHelper.CAPTURE_PHOTO_REQUEST_CODE) {
File photoFile = mCapturePhotoHelper.getPhoto();
// 代码省略
}
是不是因为 mCapturePhotoHelper
被回收了啊?
不知道你尝试过多布局没有,如果RecycleView里面有多种布局会出现找不到布局ID的问题,还请赐教
BitmapUtils.JPG_SUFFIX 这个值是什么 请问
模拟器Nexus6P 6.0
点击“拍张照片吧”,没有拍照,只显示 “未指定存储目录”
Plugin with id "com.android.application" not found
Matrix multiplication is not commutative law,How can I guarantee the changes as expected?
for example, the first call postTranslate, then call postRotate. If reversed, the result is completely different.
thanks
如果一个activity有很多fragment,那么写起来的代码就会有很多重复的,如何封装?
还是这里好玩 😄
应该是前面是postTranslate,后面是preTranslate
` long totalPixels = width * height / inSampleSize;
final long totalReqPixelsCap = reqWidth * reqHeight * 2;
while (totalPixels > totalReqPixelsCap) {
inSampleSize *= 2;
totalPixels /= 2;
}`
i dont quite understand the code here, maybe long totalPixels = width * height / inSampleSize;
should be long totalPixels = width * height / (inSampleSize * inSampleSize )
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.