Does anyone know how to forcefully unload a ByteArray from memory in AS3?
I have tried (without success):
byteArray.length = 0;
byteArray = new ByteArray();
and
for ( var i:int=0; i<byteArray.length; i++ ) {
byteArray[i] = null;
}
Any ideas?
First of all dp != px
Read this http://developer.android.com/guide/practices/screens_support.html
You do not have to provide different layouts for different screen sizes, however the possibility of say a tablet displaying more data over a phone is there – so you may want to give the user more options or show the navigation constantly.
AS for handling images, at the above link, you should take the xhdpi/hdpi size and recreate it at x0.75 (ldpi), normal (mdpi), x1.5 (hdpi) and x2.0 (xhdpi). You then can reference the single image ‘R.drawable.logo’ and the phone will pick the most appropriate available resource from the relevant drawable folder (e.g. drawable-hdpi).
Plug moment, we have build an alpha tool to do the resizing based on c# .net 2.0 we will publish Alpha version at http://www.wiseman-designs.com/downloads/android-icon-creator/, EDIT: which is free for everyone for anything – source will be released after xmas.