¡@

Home 

2014/10/16 ¤W¤È 08:25:29

android Programming Glossary: surface

ViewPager with Google Maps API v2: mysterious black view

http://stackoverflow.com/questions/13837697/viewpager-with-google-maps-api-v2-mysterious-black-view

share improve this question I was able to stop the black surface being left behind after transition by placing another view with..

Android Camera without Preview

http://stackoverflow.com/questions/2386025/android-camera-without-preview

needs preview to setup exposure and focus. I've created a surfaceview and listener but the onSurfaceCreated event never gets fired... event never gets fired. I guess the reason is the surface is not being created visually. I've also seen some examples.. platform can't stream video until it given valid preview surface. it seems that the architects of the platform was not thinking..

Singletons vs. Application Context in Android?

http://stackoverflow.com/questions/3826905/singletons-vs-application-context-in-android

indeterminism with subtle side effects which may suddenly surface when moving calls to getInstance from one scope to another ...

Android - Camera preview is sideways

http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways

see's on the screen. I can get everything working fine surface created surface set and the surface is displayed. However it.. screen. I can get everything working fine surface created surface set and the surface is displayed. However it always displays.. working fine surface created surface set and the surface is displayed. However it always displays the picture at an incorrect..

Android VideoView orientation change with buffered video

http://stackoverflow.com/questions/4434027/android-videoview-orientation-change-with-buffered-video

not start buffering as the video won't be set to draw on a surface of any size. onCreate questionVideo.setDimensions initialWidth..

How can I use the animation framework inside the canvas?

http://stackoverflow.com/questions/4938822/how-can-i-use-the-animation-framework-inside-the-canvas

to objects such as views and layouts. The canvas is just a surface for drawing which is either part of a View or linked to a bitmap... This is just a simple illustration but I would use surfaceView and drive frames from another thread which is a bit more.. framesCount framesCount 0 @Override public void surfaceChanged SurfaceHolder holder int format int width int height..

Android crash when app is closed and reopened

http://stackoverflow.com/questions/5318847/android-crash-when-app-is-closed-and-reopened

register our interest in hearing about changes to our surface SurfaceHolder holder getHolder holder.addCallback this _thread.. canvas.drawColor Color.WHITE @Override public void surfaceChanged SurfaceHolder holder int format int width int height.. width int height resize canvas here @Override public void surfaceCreated SurfaceHolder holder _thread.setRunning true _thread.start..

how to make surfaceview transparent

http://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transparent

to make surfaceview transparent Hello all i want to make my DrawingSurface.. thing but it's not working. Here is my xml code to make my surface view transparent xml version 1.0 encoding utf 8 RelativeLayout.. layout_weight 10 LinearLayout RelativeLayout android surfaceview share improve this question Try this SurfaceView sfvTrack..

Android accelerometer accuracy (Inertial navigation)

http://stackoverflow.com/questions/7829097/android-accelerometer-accuracy-inertial-navigation

of readings. To start with I set the phone on a flat surface and sampled 1000 accelerometer readings in the X and Y directions..

Android :: Possible To Camera Capture Without A Preview?

http://stackoverflow.com/questions/9744790/android-possible-to-camera-capture-without-a-preview

improve this question Here is the example for dummy surface view. public void takePictureNoPreview Context context open.. set camera parameters if you want to ... here the unused surface view and holder SurfaceView dummy new SurfaceView context myCamera.setPreviewDisplay..

camera app not working?

http://stackoverflow.com/questions/10186503/camera-app-not-working

import android.os.Bundle import android.view.Surface import android.view.SurfaceHolder import android.view.SurfaceView.. import android.view.Surface import android.view.SurfaceHolder import android.view.SurfaceView import android.view.View.. import android.view.SurfaceHolder import android.view.SurfaceView import android.view.View import android.view.View.OnClickListener..

Android: Capturing the return of an activity

http://stackoverflow.com/questions/449484/android-capturing-the-return-of-an-activity

work as expected w the exception of the Camera Preview Surface B . It is rotated 90 degrees. They only way to make it correct..

Understanding Canvas and Surface concepts

http://stackoverflow.com/questions/4576909/understanding-canvas-and-surface-concepts

Canvas and Surface concepts I'm struggling to understand the process of drawing.. I'm struggling to understand the process of drawing to SurfaceView and therefore the whole Surface Canvas Bitmap system which.. process of drawing to SurfaceView and therefore the whole Surface Canvas Bitmap system which is used in Android. I've read all..

How to set Android camera orientation properly?

http://stackoverflow.com/questions/4645960/how-to-set-android-camera-orientation-properly

but nothing seems to be working. I tried to rotate the Surface as well as the camera parameters but the camera preview in portrait.. I am using right now which works in landscape mode only. SurfaceHolder.Callback surfaceCallback new SurfaceHolder.Callback @Override.. mode only. SurfaceHolder.Callback surfaceCallback new SurfaceHolder.Callback @Override public void surfaceDestroyed SurfaceHolder..

Android crash when app is closed and reopened

http://stackoverflow.com/questions/5318847/android-crash-when-app-is-closed-and-reopened

setContentView new Panel this class Panel extends SurfaceView implements SurfaceHolder.Callback private TutorialThread.. new Panel this class Panel extends SurfaceView implements SurfaceHolder.Callback private TutorialThread _thread public Panel Context.. our interest in hearing about changes to our surface SurfaceHolder holder getHolder holder.addCallback this _thread new TutorialThread..

How can I manipulate the camera preview?

http://stackoverflow.com/questions/6478375/how-can-i-manipulate-the-camera-preview

to be able to modify it. To do that you'd need to have a SurfaceView that you can manually run draw calls with. There are a couple.. than trying to process every frame. Also I changed the SurfaceHolder.SURFACE_TYPE_NORMAL from what would be needed if you wanted.. e Log.e Camera mCamera.setPreviewDisplay holder And the SurfaceHolder.SURFACE_TYPE_NORMAL SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

AndroidRuntime 5040 at com.matthewmitchell.nightcam.CameraSurfaceView.surfaceCreated CameraSurfaceView.java 47 10 30 00 31 52.588.. CameraSurfaceView.java 47 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.updateWindow.. 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.updateWindow SurfaceView.java 544 10 30 00 31 52.588 E AndroidRuntime..

ViewPager with Google Maps API v2: mysterious black view

http://stackoverflow.com/questions/13837697/viewpager-with-google-maps-api-v2-mysterious-black-view

pageFragment android google maps android viewpager share improve this question I was able to stop the black surface being left behind after transition by placing another view with a transparent background on top of the ViewPager inside..

Android Camera without Preview

http://stackoverflow.com/questions/2386025/android-camera-without-preview

a preview the image will be black since android camera needs preview to setup exposure and focus. I've created a surfaceview and listener but the onSurfaceCreated event never gets fired. I guess the reason is the surface is not being created.. I've created a surfaceview and listener but the onSurfaceCreated event never gets fired. I guess the reason is the surface is not being created visually. I've also seen some examples of calling the camera statically with MediaStore.CAPTURE_OR_SOMETHING.. this question it is really weird that camera on android platform can't stream video until it given valid preview surface. it seems that the architects of the platform was not thinking about 3rd party video streaming applications at all. even..

Singletons vs. Application Context in Android?

http://stackoverflow.com/questions/3826905/singletons-vs-application-context-in-android

for testing and if lazily initialized will introduce state indeterminism with subtle side effects which may suddenly surface when moving calls to getInstance from one scope to another . Visibility has been mentioned as another problem and since..

Android - Camera preview is sideways

http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways

is sideways I am using a Preview to display what the camera see's on the screen. I can get everything working fine surface created surface set and the surface is displayed. However it always displays the picture at an incorrect 90 degree angle.. I am using a Preview to display what the camera see's on the screen. I can get everything working fine surface created surface set and the surface is displayed. However it always displays the picture at an incorrect 90 degree angle in portrait mode... to display what the camera see's on the screen. I can get everything working fine surface created surface set and the surface is displayed. However it always displays the picture at an incorrect 90 degree angle in portrait mode. Such as in the picture..

Android VideoView orientation change with buffered video

http://stackoverflow.com/questions/4434027/android-videoview-orientation-change-with-buffered-video

inside the onCreate method as well or your video will not start buffering as the video won't be set to draw on a surface of any size. onCreate questionVideo.setDimensions initialWidth initialHeight One last key part if you ever find yourself..

How can I use the animation framework inside the canvas?

http://stackoverflow.com/questions/4938822/how-can-i-use-the-animation-framework-inside-the-canvas

improve this question The Android animation class applies to objects such as views and layouts. The canvas is just a surface for drawing which is either part of a View or linked to a bitmap. In onDraw in a custom view only one frame is drawn at.. it looks like ball has rotated. Call the next frame. invalidate This is just a simple illustration but I would use surfaceView and drive frames from another thread which is a bit more complicated but a proper way to do when making interactive.. framesCount if now framesTimer 1000 framesTimer now framesCountAvg framesCount framesCount 0 @Override public void surfaceChanged SurfaceHolder holder int format int width int height @Override public void surfaceCreated SurfaceHolder holder thread..

Android crash when app is closed and reopened

http://stackoverflow.com/questions/5318847/android-crash-when-app-is-closed-and-reopened

_thread public Panel Context context super context register our interest in hearing about changes to our surface SurfaceHolder holder getHolder holder.addCallback this _thread new TutorialThread holder this setFocusable true @Override.. @Override public void onDraw Canvas canvas Clear the background canvas.drawColor Color.WHITE @Override public void surfaceChanged SurfaceHolder holder int format int width int height resize canvas here @Override public void surfaceCreated SurfaceHolder.. void surfaceChanged SurfaceHolder holder int format int width int height resize canvas here @Override public void surfaceCreated SurfaceHolder holder _thread.setRunning true _thread.start @Override public void surfaceDestroyed SurfaceHolder holder..

how to make surfaceview transparent

http://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transparent

to make surfaceview transparent Hello all i want to make my DrawingSurface view transparent. i tried many thing but it's not working. Here.. to make my DrawingSurface view transparent. i tried many thing but it's not working. Here is my xml code to make my surface view transparent xml version 1.0 encoding utf 8 RelativeLayout xmlns android http schemas.android.com apk res android android.. R android onClick onClick android id @ id redoBtn android layout_weight 10 LinearLayout RelativeLayout android surfaceview share improve this question Try this SurfaceView sfvTrack SurfaceView findViewById R.id.sfvTrack sfvTrack.setZOrderOnTop..

Android accelerometer accuracy (Inertial navigation)

http://stackoverflow.com/questions/7829097/android-accelerometer-accuracy-inertial-navigation

is hard given the accelerometer accuracy and constant fluctuation of readings. To start with I set the phone on a flat surface and sampled 1000 accelerometer readings in the X and Y directions parallel to the table so no gravity acting in these directions..

Android :: Possible To Camera Capture Without A Preview?

http://stackoverflow.com/questions/9744790/android-possible-to-camera-capture-without-a-preview

image in background and store it in the device android share improve this question Here is the example for dummy surface view. public void takePictureNoPreview Context context open back facing camera by default Camera myCamera Camera.open if.. default Camera myCamera Camera.open if myCamera null try set camera parameters if you want to ... here the unused surface view and holder SurfaceView dummy new SurfaceView context myCamera.setPreviewDisplay dummy.getHolder myCamera.startPreview..

camera app not working?

http://stackoverflow.com/questions/10186503/camera-app-not-working

import android.hardware.Camera import android.media.MediaRecorder import android.os.Bundle import android.view.Surface import android.view.SurfaceHolder import android.view.SurfaceView import android.view.View import android.view.View.OnClickListener.. import android.media.MediaRecorder import android.os.Bundle import android.view.Surface import android.view.SurfaceHolder import android.view.SurfaceView import android.view.View import android.view.View.OnClickListener import android.widget.ToggleButton.. import android.os.Bundle import android.view.Surface import android.view.SurfaceHolder import android.view.SurfaceView import android.view.View import android.view.View.OnClickListener import android.widget.ToggleButton public class MediaRecorderRecipe..

Android: Capturing the return of an activity

http://stackoverflow.com/questions/449484/android-capturing-the-return-of-an-activity

is that the application runs in Portrait mode. All 3 tabs work as expected w the exception of the Camera Preview Surface B . It is rotated 90 degrees. They only way to make it correct is to set the app to landscape which throws all my tabs around..

Understanding Canvas and Surface concepts

http://stackoverflow.com/questions/4576909/understanding-canvas-and-surface-concepts

Canvas and Surface concepts I'm struggling to understand the process of drawing to SurfaceView and therefore the whole Surface Canvas Bitmap.. Canvas and Surface concepts I'm struggling to understand the process of drawing to SurfaceView and therefore the whole Surface Canvas Bitmap system which is used in Android. I've read all articles and API documentation.. and Surface concepts I'm struggling to understand the process of drawing to SurfaceView and therefore the whole Surface Canvas Bitmap system which is used in Android. I've read all articles and API documentation pages which I was able to find..

How to set Android camera orientation properly?

http://stackoverflow.com/questions/4645960/how-to-set-android-camera-orientation-properly

orientation according to the device orientation in Android but nothing seems to be working. I tried to rotate the Surface as well as the camera parameters but the camera preview in portrait mode always comes upside down. I would need to rotate.. by 90 degree clockwise for it to be correct. Here is the code I am using right now which works in landscape mode only. SurfaceHolder.Callback surfaceCallback new SurfaceHolder.Callback @Override public void surfaceDestroyed SurfaceHolder holder camera.stopPreview.. Here is the code I am using right now which works in landscape mode only. SurfaceHolder.Callback surfaceCallback new SurfaceHolder.Callback @Override public void surfaceDestroyed SurfaceHolder holder camera.stopPreview camera.release camera null..

Android crash when app is closed and reopened

http://stackoverflow.com/questions/5318847/android-crash-when-app-is-closed-and-reopened

WindowManager.LayoutParams.FLAG_FULLSCREEN setContentView new Panel this class Panel extends SurfaceView implements SurfaceHolder.Callback private TutorialThread _thread public Panel Context context super context register.. WindowManager.LayoutParams.FLAG_FULLSCREEN setContentView new Panel this class Panel extends SurfaceView implements SurfaceHolder.Callback private TutorialThread _thread public Panel Context context super context register our interest in hearing.. _thread public Panel Context context super context register our interest in hearing about changes to our surface SurfaceHolder holder getHolder holder.addCallback this _thread new TutorialThread holder this setFocusable true @Override public..

How can I manipulate the camera preview?

http://stackoverflow.com/questions/6478375/how-can-i-manipulate-the-camera-preview

array. You'd need to draw it manually onto a surface in order to be able to modify it. To do that you'd need to have a SurfaceView that you can manually run draw calls with. There are a couple of flags you can set that accomplish that. In order to.. returned camera image and draw an overlay it'd be much faster than trying to process every frame. Also I changed the SurfaceHolder.SURFACE_TYPE_NORMAL from what would be needed if you wanted a camera preview to show up. So a couple of changes to.. code try mCamera.setPreviewDisplay holder catch IOException e Log.e Camera mCamera.setPreviewDisplay holder And the SurfaceHolder.SURFACE_TYPE_NORMAL SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS for preview to work Should allow you to overlay frames..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

Native Method 10 30 00 31 52.588 E AndroidRuntime 5040 at com.matthewmitchell.nightcam.CameraSurfaceView.surfaceCreated CameraSurfaceView.java 47 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.updateWindow.. Method 10 30 00 31 52.588 E AndroidRuntime 5040 at com.matthewmitchell.nightcam.CameraSurfaceView.surfaceCreated CameraSurfaceView.java 47 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.updateWindow SurfaceView.java 544 10 30.. CameraSurfaceView.java 47 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.updateWindow SurfaceView.java 544 10 30 00 31 52.588 E AndroidRuntime 5040 at android.view.SurfaceView.dispatchDraw..