Code example for DisplayMetrics

Methods: getMetrics

		mMap.put(context, this);
		mContext = context;
		if(PIXEL_DENSITY == 0.0f) {
			DisplayMetrics metrics = new DisplayMetrics();
			PIXEL_DENSITY = metrics.density;
			PIXEL_DENSITY_DPI = metrics.densityDpi;
		 *  Adaptive ResPatch by Petar Segina <> 
		 *  By default, Gallery3D is made to load very low resolution images in 
		 *  order to avoid running into outOfMemory situations. Since some devices come with enormous 
		 *  amounts of memory and processing power, it is pointless not to use those resources. So,  
		 *  depending on the maximum heap size available, we want to determine the highest 
		 *  possible upscale factor. This is calculated from the heap size and then used in 
		 * to return higher resolution images.