dialog widths

This commit is contained in:
Milos Kozak 2017-06-27 00:11:23 +02:00
parent dbd721319e
commit 7b1b9c9881
5 changed files with 6 additions and 5 deletions

View file

@ -71,7 +71,7 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
public void onResume() {
super.onResume();
if (getDialog() != null)
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getDialog().getWindow().setLayout(1000, ViewGroup.LayoutParams.WRAP_CONTENT);
MainApp.bus().register(this);
running = true;
if (bolusEnded) dismiss();

View file

@ -70,7 +70,7 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
public void onResume() {
super.onResume();
if (getDialog() != null)
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
@Override

View file

@ -131,7 +131,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
public void onResume() {
super.onResume();
if (getDialog() != null)
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getDialog().getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
MainApp.bus().register(this);
}

View file

@ -11,6 +11,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.Services.Intents;
@ -155,7 +156,7 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
@Override
public String getUnits() {
return profile.getUnits();
return profile != null ? profile.getUnits() : Constants.MGDL;
}
@Override

View file

@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.nightscout.androidaps.plugins.InsulinFastacting.InsulinFastactingFragment">
tools:context="info.nightscout.androidaps.plugins.Overview.Dialogs.NewTreatmentDialog">
<ScrollView
android:layout_width="match_parent"