我正在尝试构建自己的网格视图函数 - 扩展GridView.我唯一无法解决的是如何获得当前的滚动位置GridView.
getScrollY()总是返回0,并且onScrollListener参数只是一系列可见的子视图,而不是实际的滚动位置.
这似乎并不困难,但我在网上找不到解决方案.
这里有谁有想法?
我正在使用Android 4.3的新MediaCodec和MediaMuxer API开发一个关于previewTexture录制的Android测试用例的实现.
I've managed to record the preview stream with a framerate of about 30fps by setting the recordingHint to the camera paremeters.
However, I ran into a delay/lag problem and don't really know how to fix that. When recording the camera preview with quite standard quality settings (1280x720, bitrate of ~8.000.000) the preview and the encoded material suffers from occasional lags. To be more specific: This lag occurs about every 2-3 seconds and takes about 300-600ms. …
我正在开发一个Android相机应用程序,我们在几个场景中使用uris,例如将结果数据从我们的相机传送回启动我们的应用程序结果,或者当用户点击共享按钮时打开IntentChooser.
目前我们在大多数情况下使用File Uris,因为它似乎是更安全的解决方案.使用ContentResolver和MediaStore总会出现问题.此外我记得前段时间有很多应用程序,它们不支持内容Uris,但文件Uris非常好.
但是,当用户决定不在Android 6.0上提供"环聊"文件访问权限时,我们现在通过Google邮寄了与File Uris一起发送不允许其"环聊"应用访问该文件的文件.
我现在的问题是:在向其他应用程序提供内容时,我们通常是否应该从File Uris切换到Content Uris?这是要走的路,每个应用都应该依赖/支持内容Uris吗?
android file-permissions android-contentprovider file-uri android-6.0-marshmallow
I am referring to this excellent example of how to encode the preview frames of the camera directly into an mp4 file: http://bigflake.com/mediacodec/CameraToMpegTest.java.txt
I have adopted the code in the way that I also would like to render the preview image on the screen. Therefore I got something like a GLTextureView with its own EGLContext. This Context is then used as shared EGLContext when I create the EGLContext for the encoder rendering:
mEGLContext = EGL14.eglCreateContext(mEGLDisplay, configs[0], sharedContext == null ? …Run Code Online (Sandbox Code Playgroud)