diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/BodyEnergyFragment.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/BodyEnergyFragment.java index 6839bcf3b..b7f311116 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/BodyEnergyFragment.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/BodyEnergyFragment.java @@ -4,6 +4,7 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; +import android.os.Build; import android.os.Bundle; import android.util.TypedValue; import android.view.LayoutInflater; @@ -63,6 +64,12 @@ public class BodyEnergyFragment extends AbstractChartFragment= Build.VERSION_CODES.M) { + rootView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> { + getChartsHost().enableSwipeRefresh(scrollY == 0); + }); + } + mDateView = rootView.findViewById(R.id.body_energy_date_view); bodyEnergyGauge = rootView.findViewById(R.id.body_energy_gauge); bodyEnergyGained = rootView.findViewById(R.id.body_energy_gained); diff --git a/app/src/main/res/layout/fragment_body_energy.xml b/app/src/main/res/layout/fragment_body_energy.xml index bc7723ec6..8b6d8053f 100644 --- a/app/src/main/res/layout/fragment_body_energy.xml +++ b/app/src/main/res/layout/fragment_body_energy.xml @@ -1,4 +1,4 @@ - + android:gravity="center" + android:textSize="20sp" /> + android:layout_gravity="center" + android:scaleType="fitStart" /> + android:background="@color/gauge_line_color" + android:columnCount="2"> + + android:layout_marginTop="2dp" + android:layout_marginEnd="1dp"> + + + + android:layout_marginTop="2dp" + android:layout_marginEnd="1dp"> + + android:layout_height="250sp"> + - +