안드로이드 초짜입니다..ㅋ

 

지금 birmap을 공부중인데. 화면을 하나 띄웠습니다,.

 

아래 보는바와같이 app이 화면에 꽉차서 나오지가 않네요. 붉은색이 app의 크기이고

 

노란 박스가 실제 폰의 외곽입니다.

 

화면.jpg

 

canvas를 아무리 지지고 복고 해봐도 320*480으로 뿐이 안되네요.

 

어떤식으로  제폰의 사이즈를 가져와서 꽉찬 화면으로 바꿀 수 있을까요??

 

xml에 설정하는 부분이 있나요?? 아니면 소스상에서 처리해줘야 하나요??

 

 

아래는 소스에서 onDraw의 일부분만 발췌했습니다.

   
         @Override protected void onDraw(Canvas canvas) {
          
           mCanvas = canvas;
             canvas.drawColor(Color.BLUE);
           
           
             int init = canvas.getHeight() - canvas.getClipBounds().bottom;          
             int height =canvas.getClipBounds().bottom;
             int width = canvas.getClipBounds().right;
            
             Log.i("BItmap","height = "+canvas.getHeight() + "  width = "+canvas.getWidth());
         
            
//             canvas.scale( parentContext.mDisplayWidth/canvas.getWidth(), parentContext.mDisplayHeight/canvas.getHeight());
//             canvas.scale( 1, 1);


             //Bitmap jayPic = BitmapFactory.decodeResource(getResources(), R.drawable.bluejay);
             Bitmap leafletmain = BitmapFactory.decodeStream(parentContext.mFTP.getImageFileStream(0));
             mainPic= Bitmap.createScaledBitmap(leafletmain,(int)(width*1.0), (int)(height*1.0), false);
            

}

 

안그래도 UI에 쥐약인데 안드로이드 하면서 UI가 젤 무섭습니다..ㅋ