onMeasure throw a NullPointerException if not settled the adapter