fix merge conflict

This commit is contained in:
Milos Kozak 2017-06-20 20:01:09 +02:00
commit 134efb04bf
3 changed files with 381 additions and 401 deletions

View file

@ -212,12 +212,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
int screen_height = dm.heightPixels; int screen_height = dm.heightPixels;
smallWidth = screen_width < Constants.SMALL_WIDTH; smallWidth = screen_width < Constants.SMALL_WIDTH;
smallHeight = screen_height < Constants.SMALL_HEIGHT; smallHeight = screen_height < Constants.SMALL_HEIGHT;
boolean landscape = screen_height < screen_width;
View view; View view;
if (MainApp.sResources.getBoolean(R.bool.isTablet)) { if (MainApp.sResources.getBoolean(R.bool.isTablet)) {
view = inflater.inflate(R.layout.overview_fragment_tablet, container, false); view = inflater.inflate(R.layout.overview_fragment_tablet, container, false);
} else if (smallHeight) { } else if (smallHeight || landscape) {
view = inflater.inflate(R.layout.overview_fragment_smallheight, container, false); view = inflater.inflate(R.layout.overview_fragment_smallheight, container, false);
} else { } else {
view = inflater.inflate(R.layout.overview_fragment, container, false); view = inflater.inflate(R.layout.overview_fragment, container, false);

View file

@ -11,6 +11,8 @@ public class SafeParse {
public static Double stringToDouble(String input) { public static Double stringToDouble(String input) {
Double result = 0d; Double result = 0d;
input = input.replace(",", "."); input = input.replace(",", ".");
if (input.equals(""))
return 0d;
try { try {
result = Double.parseDouble(input); result = Double.parseDouble(input);
} catch (Exception e) { } catch (Exception e) {
@ -22,6 +24,8 @@ public class SafeParse {
public static Integer stringToInt(String input) { public static Integer stringToInt(String input) {
Integer result = 0; Integer result = 0;
input = input.replace(",", "."); input = input.replace(",", ".");
if (input.equals(""))
return 0;
try { try {
result = Integer.parseInt(input); result = Integer.parseInt(input);
} catch (Exception e) { } catch (Exception e) {
@ -33,6 +37,8 @@ public class SafeParse {
public static Long stringToLong(String input) { public static Long stringToLong(String input) {
Long result = 0L; Long result = 0L;
input = input.replace(",", "."); input = input.replace(",", ".");
if (input.equals(""))
return 0L;
try { try {
result = Long.parseLong(input); result = Long.parseLong(input);
} catch (Exception e) { } catch (Exception e) {

View file

@ -5,14 +5,9 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="info.nightscout.androidaps.plugins.Overview.OverviewFragment"> tools:context="info.nightscout.androidaps.plugins.Overview.OverviewFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent" >
android:layout_above="@+id/overview_buttons">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -306,34 +301,13 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph" android:id="@+id/overview_bggraph"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="160dip" android:layout_height="160dip" />
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<TextView
android:id="@+id/overview_updating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:text="@string/updating"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/updating"
android:textStyle="bold" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"
@ -439,5 +413,4 @@
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</RelativeLayout>
</FrameLayout> </FrameLayout>