I got my 1st crash report for my app. It says there is a java.lang.ArithmeticException: divide by zero
The exception is on one of these two lines:
//sWP stands for "Screen Width in Pixels"
// sW stands for "Screen Width" The code is old though, so I may be incorrect for both variables.
//res is just getResources()
int sWP = sW / (res.getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEFAULT);
float bHeight = 50 * ((float)res.getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEFAULT);
Can DisplayMetrics.DENSITY_DEFAULT
ever be zero? Or can getDisplayMetrics().densityDpi
ever be zero?