fix BolusProgessDialog size on Android 6

This commit is contained in:
Milos Kozak 2016-10-11 23:49:26 +02:00
parent 9cd8602f83
commit 5ec339e987
2 changed files with 41 additions and 43 deletions

View file

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

View file

@ -1,50 +1,47 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog">
android:orientation="vertical"
tools:context="info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog"
android:paddingTop="15dp"
android:paddingBottom="15dp">
<LinearLayout
android:orientation="vertical"
<TextView
android:id="@+id/overview_bolusprogress_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
<TextView
android:id="@+id/overview_bolusprogress_stoppressed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:text="@string/overview_bolusprogress_stoppressed"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#fd0101"
android:textStyle="bold"
android:visibility="gone" />
<ProgressBar
android:id="@+id/overview_bolusprogress_progressbar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="20dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="20dp"
android:maxHeight="5dp"
android:minHeight="3dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/overview_bolusprogress_status"
android:layout_gravity="center_horizontal" />
<Button
android:id="@+id/overview_bolusprogress_stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="@string/overview_bolusprogress_stop" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/overview_bolusprogress_stoppressed"
android:id="@+id/overview_bolusprogress_stoppressed"
android:layout_gravity="center_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:textColor="#fd0101"
android:layout_marginTop="20dp"
android:visibility="gone" />
<ProgressBar
android:id="@+id/overview_bolusprogress_progressbar"
android:layout_height="20dp"
android:layout_width="match_parent"
style="@android:style/Widget.ProgressBar.Horizontal"
android:minHeight="3dp"
android:maxHeight="5dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/overview_bolusprogress_stop"
android:id="@+id/overview_bolusprogress_stop"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp" />
</LinearLayout>
</FrameLayout>
</LinearLayout>