From 2737a385a2a7f834cad11ca2486af2f2001b7b65 Mon Sep 17 00:00:00 2001 From: OliE Date: Fri, 12 Feb 2016 16:47:36 +0100 Subject: [PATCH] - don't force the orientation to landscape mode --- android_app/app/src/main/AndroidManifest.xml | 4 +- .../openscale/gui/OverviewFragment.java | 15 - .../res/layout-large/fragment_overview.xml | 987 ++++++++++++++++++ .../main/res/layout-large/fragment_table.xml | 144 +++ .../src/main/res/layout/fragment_graph.xml | 5 +- .../src/main/res/layout/fragment_overview.xml | 308 +++--- .../src/main/res/layout/fragment_table.xml | 25 +- 7 files changed, 1309 insertions(+), 179 deletions(-) create mode 100644 android_app/app/src/main/res/layout-large/fragment_overview.xml create mode 100644 android_app/app/src/main/res/layout-large/fragment_table.xml diff --git a/android_app/app/src/main/AndroidManifest.xml b/android_app/app/src/main/AndroidManifest.xml index 5a702ef7..57952101 100644 --- a/android_app/app/src/main/AndroidManifest.xml +++ b/android_app/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="7" + android:versionName="1.3.1" > diff --git a/android_app/app/src/main/java/com/health/openscale/gui/OverviewFragment.java b/android_app/app/src/main/java/com/health/openscale/gui/OverviewFragment.java index 5cfef0d6..bd901b8b 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/OverviewFragment.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/OverviewFragment.java @@ -15,11 +15,9 @@ */ package com.health.openscale.gui; -import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Color; import android.os.Bundle; @@ -876,19 +874,6 @@ public class OverviewFragment extends Fragment implements FragmentUpdateListener } } - @Override - public void setUserVisibleHint(boolean isVisibleToUser) { - super.setUserVisibleHint(isVisibleToUser); - - if (isVisibleToUser) { - if ((getActivity().getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_XLARGE && - (getActivity().getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_LARGE) { - Activity a = getActivity(); - if (a != null) a.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } - } - } - private class LineChartTouchListener implements LineChartOnValueSelectListener { @Override public void onValueSelected(int lineIndex, int pointIndex, PointValue pointValue) { diff --git a/android_app/app/src/main/res/layout-large/fragment_overview.xml b/android_app/app/src/main/res/layout-large/fragment_overview.xml new file mode 100644 index 00000000..539d2a61 --- /dev/null +++ b/android_app/app/src/main/res/layout-large/fragment_overview.xml @@ -0,0 +1,987 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +