안드로이드 개발 질문/답변
(글 수 45,052)
<com.mpcap.Mapsearch.Zoom
android:id="@+id/imagemap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
Zoom.java
호출 함수
//이미지 확대
public void ImageScaleUp()
{
mWidth= mWidth+10;
mHeight= mHeight+10;
System.out.println("height="+ mHeight+"mWidth="+mWidth);
resize= Bitmap.createScaledBitmap(mViewBitmap, mWidth,mHeight,false);
invalidate();
}
//이미지 축소
public void ImageScaleDown()
{
mWidth= mWidth-10;
mHeight= mHeight-10;
System.out.println("height="+ mHeight+"mWidth="+mWidth);
resize= Bitmap.createScaledBitmap(mViewBitmap, mWidth,mHeight,false);
invalidate();
}
함수를 쓸 소스
Zoom zoom=new Zoom;
zoom.ImageScaleUp();
이렇게 하니간 안돼더라구요 ;
방법이 없을까요?
android:id="@+id/imagemap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
Zoom.java
호출 함수
//이미지 확대
public void ImageScaleUp()
{
mWidth= mWidth+10;
mHeight= mHeight+10;
System.out.println("height="+ mHeight+"mWidth="+mWidth);
resize= Bitmap.createScaledBitmap(mViewBitmap, mWidth,mHeight,false);
invalidate();
}
//이미지 축소
public void ImageScaleDown()
{
mWidth= mWidth-10;
mHeight= mHeight-10;
System.out.println("height="+ mHeight+"mWidth="+mWidth);
resize= Bitmap.createScaledBitmap(mViewBitmap, mWidth,mHeight,false);
invalidate();
}
함수를 쓸 소스
Zoom zoom=new Zoom;
zoom.ImageScaleUp();
이렇게 하니간 안돼더라구요 ;
방법이 없을까요?
extends Acitvity가 아닌 그냥 클래스로 말이죠.