Now on i tried to Run my code, there is error as follows,
"Unable to execute dex: java.nio.BufferOverflowException. "
I tried to check it line by line, but not solve yet
anyone can give me some advise,
Thank you
Printable View
Now on i tried to Run my code, there is error as follows,
"Unable to execute dex: java.nio.BufferOverflowException. "
I tried to check it line by line, but not solve yet
anyone can give me some advise,
Thank you
Hi,
Please post your full code what you have tried.
Happy to help:o
Thanks,
ERROR COME FROM private WindowManager wm;Code :
public class MyView extends RelativeLayout { // Bitmap localBitmap; private static final String TAG = "MyView"; // private final int FP = -1; // private final int WC = -2; public boolean disableApplication = false; private int imgType = 1; public boolean isBlack = false; boolean isInitialized; private Bitmap myBitmap; private Paint myPaint = new Paint(); private int[] numbers; private Tama[] oyatamaArray; private Tama[][] tamaArray; private Bitmap localBitmap; private Context ctx; private WindowManager wm;
Code :
public int getWinHeight() { ctx = getContext(); wm = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE); DisplayMetrics displaymetrics = new DisplayMetrics(); int height = displaymetrics.heightPixels; // int width = displaymetrics.widthPixels; return height; } public int getWinWidth() { ctx = getContext(); wm = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE); DisplayMetrics displaymetrics = new DisplayMetrics(); // int height = displaymetrics.heightPixels; int width = displaymetrics.widthPixels; return width;