¡@

Home 

2014/10/16 ¤W¤È 08:12:31

android Programming Glossary: displayheight

Android : Stop image scaling down

http://stackoverflow.com/questions/3045227/android-stop-image-scaling-down

private static int displayWidth 0 private static int displayHeight 0 Called when the activity is first created. @Override public.. super.onCreate savedInstanceState displayWidth and displayHeight will change depending on screen orientation. To get these dynamically.. .getDefaultDisplay displayWidth display.getWidth displayHeight display.getHeight SampleView constructor must be constructed..

Android VideoView orientation change with buffered video

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

questionVideo.setDimensions displayHeight displayWidth questionVideo.getHolder .setFixedSize displayHeight.. displayWidth questionVideo.getHolder .setFixedSize displayHeight displayWidth else getWindow .setFlags WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN..

Android image view matrix scale + translate

http://stackoverflow.com/questions/6075363/android-image-view-matrix-scale-translate

float displayWidth float imageWidth float scaleY float displayHeight float imageHeight float minScale Math.min scaleX scaleY tx ty.. minScale imageWidth float ty Math.max 0 0.5f float displayHeight minScale imageHeight Compute the matrix Matrix m new Matrix..

Android : Stop image scaling down

http://stackoverflow.com/questions/3045227/android-stop-image-scaling-down

extends Activity Physical display width and height. private static int displayWidth 0 private static int displayHeight 0 Called when the activity is first created. @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState.. created. @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState displayWidth and displayHeight will change depending on screen orientation. To get these dynamically we should hook onSizeChanged . This simple example.. Display display WindowManager getSystemService Context.WINDOW_SERVICE .getDefaultDisplay displayWidth display.getWidth displayHeight display.getHeight SampleView constructor must be constructed last as it needs the displayWidth and displayHeight we just..

Android VideoView orientation change with buffered video

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

WindowManager.LayoutParams.FLAG_FULLSCREEN WindowManager.LayoutParams.FLAG_FULLSCREEN questionVideo.setDimensions displayHeight displayWidth questionVideo.getHolder .setFixedSize displayHeight displayWidth else getWindow .setFlags WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN.. questionVideo.setDimensions displayHeight displayWidth questionVideo.getHolder .setFixedSize displayHeight displayWidth else getWindow .setFlags WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN..

Android image view matrix scale + translate

http://stackoverflow.com/questions/6075363/android-image-view-matrix-scale-translate

is the code Compute the scale to choose this works float scaleX float displayWidth float imageWidth float scaleY float displayHeight float imageHeight float minScale Math.min scaleX scaleY tx ty should be the translation to take the image back to the screen.. to the screen center float tx Math.max 0 0.5f float displayWidth minScale imageWidth float ty Math.max 0 0.5f float displayHeight minScale imageHeight Compute the matrix Matrix m new Matrix m.reset Middle of the image should be the scale pivot m.postScale..