- private Rect screenSize = new Rect(0, 0, 0, 0);
- bitmapSize = new Rect(0, 0, player.getBitmapWidth(), player.getBitmapHeight());
- float h = player.getBitmapHeight();
- int oldY = screenSize.bottom;
- if (player.getBitmap() == null) {
- Log.e(TAG, "null bitmap");
- sendMessage(ON_ERROR, null);
- return ;
- }
- int newY = (int)(h * getRatioScale(player.getBitmap(), surfaceWidth));
- int gap = (oldY - newY) / 2;
- screenSize.top += gap;
- screenSize.bottom -= gap;
'Android' 카테고리의 다른 글
Calling a Java Method from Native Code (0) | 2013.09.09 |
---|---|
한글 자소 분리 (0) | 2013.09.09 |
팝업 메뉴의 스타일 변경 - How to set the background of Android PopupMenu to White [duplicate] (0) | 2013.09.09 |
Call & SMS & Chaton intent (0) | 2013.09.09 |
메뉴 키 얻기 (0) | 2013.09.09 |