Commit ff743974 authored by Ioannis Kokkinidis's avatar Ioannis Kokkinidis Committed by zooble

Now passing layoutParams even when we already have dialog (#249)

- Fixes: https://github.com/beefe/react-native-picker/issues/248
parent c9dd0f7d
......@@ -346,6 +346,9 @@ public class PickerViewModule extends ReactContextBaseJavaModule implements Life
int height = barViewHeight + pickerViewHeight;
if (dialog == null) {
dialog = new Dialog(activity, R.style.Dialog_Full_Screen);
} else {
dialog.dismiss();
}
dialog.setContentView(view);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
Window window = dialog.getWindow();
......@@ -363,10 +366,6 @@ public class PickerViewModule extends ReactContextBaseJavaModule implements Life
layoutParams.gravity = Gravity.BOTTOM;
window.setAttributes(layoutParams);
}
} else {
dialog.dismiss();
dialog.setContentView(view);
}
}
}
......
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