Commit b67e407c authored by Geoffrey Métais's avatar Geoffrey Métais

Fix casting for division

parent 90a008ed
......@@ -244,7 +244,7 @@ public class VideoGridFragment extends BrowserFragment implements ISortable, IVi
// Compute the left/right padding dynamically
DisplayMetrics outMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
int sidePadding = (int) (outMetrics.widthPixels / 100. * Math.pow(outMetrics.density, 3) / 2.);
int sidePadding = (int) ((float)outMetrics.widthPixels / 100f * (float)Math.pow(outMetrics.density, 3) / 2f);
sidePadding = Math.max(0, Math.min(100, sidePadding));
mGridView.setPadding(sidePadding, mGridView.getPaddingTop(),
sidePadding, mGridView.getPaddingBottom());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment