correct width on more dialogs on Andriod 6

This commit is contained in:
Milos Kozak 2016-10-15 11:31:15 +02:00
parent 8ff675e8a4
commit af31ca804f
6 changed files with 36 additions and 0 deletions

View file

@ -268,6 +268,12 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
return view;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@Override
public void onClick(View view) {
Calendar calendar = Calendar.getInstance();

View file

@ -86,6 +86,12 @@ public class ProfileViewDialog extends DialogFragment {
return layout;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
private void setContent() {
if (profile == null) {
noProfile.setVisibility(View.VISIBLE);

View file

@ -66,6 +66,12 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
return view;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@Override
public void onClick(View view) {
switch (view.getId()) {

View file

@ -91,6 +91,12 @@ public class NewTempBasalDialog extends DialogFragment implements View.OnClickLi
return view;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@Override
public void onClick(View view) {
switch (view.getId()) {

View file

@ -66,6 +66,12 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
return view;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@Override
public void onClick(View view) {
switch (view.getId()) {

View file

@ -327,6 +327,12 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
private void calculateInsulin() {
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
if (profileSpinner == null || profileSpinner.getSelectedItem() == null)