Skip to content
Snippets Groups Projects
Commit 7364031d authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Adv options: fix indentation

parent 332aaf1b
No related branches found
No related tags found
No related merge requests found
......@@ -580,16 +580,16 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
}
private void setDialogDimensions(int offset) {
final Dialog dialog = getDialog();
if (dialog == null)
return;
final int dialogWidth = getResources().getDimensionPixelSize(R.dimen.option_width) * SPAN_COUNT + mRecyclerView.getPaddingLeft()+ mRecyclerView.getRight();
final int count = mAdapter.getItemCount()-offset;
final int rows = offset + (count + SPAN_COUNT-1) / SPAN_COUNT;
final int dialogHeight = getResources().getDimensionPixelSize(R.dimen.option_height) * rows + mRecyclerView.getPaddingBottom()+ mRecyclerView.getPaddingTop();
dialog.getWindow().setLayout(dialogWidth, dialogHeight);
}
final Dialog dialog = getDialog();
if (dialog == null)
return;
final int dialogWidth = getResources().getDimensionPixelSize(R.dimen.option_width) * SPAN_COUNT + mRecyclerView.getPaddingLeft()+ mRecyclerView.getRight();
final int count = mAdapter.getItemCount()-offset;
final int rows = offset + (count + SPAN_COUNT-1) / SPAN_COUNT;
final int dialogHeight = getResources().getDimensionPixelSize(R.dimen.option_height) * rows + mRecyclerView.getPaddingBottom()+ mRecyclerView.getPaddingTop();
dialog.getWindow().setLayout(dialogWidth, dialogHeight);
}
private class AdvOptionsAdapter extends RecyclerView.Adapter<AdvOptionsAdapter.ViewHolder> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment