aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2020-12-29 20:08:23 -0800
committerScott Jackson <daneren2005@gmail.com>2020-12-29 20:08:23 -0800
commit46986dbc1fd573f924b95102f7a62d10b635df75 (patch)
treecc61772891080564f60e7eba7d5f3f921acc8e65
parente40c1bd75b45aee47ffc37d16e96f971f4c8b5e4 (diff)
downloaddsub-46986dbc1fd573f924b95102f7a62d10b635df75.tar.gz
dsub-46986dbc1fd573f924b95102f7a62d10b635df75.tar.bz2
dsub-46986dbc1fd573f924b95102f7a62d10b635df75.zip
Closes #1037: Better fix for fullscreen issue that doesn't break normal viewing
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java2
-rw-r--r--app/src/main/res/layout/abstract_fullscreen_activity.xml21
2 files changed, 23 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
index d475be7b..eabc1a07 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -307,6 +307,8 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
public void setContentView(int viewId) {
if(isTv()) {
super.setContentView(R.layout.static_drawer_activity);
+ } else if(Util.getPreferences(this).getBoolean(Constants.PREFERENCES_KEY_FULL_SCREEN, false)) {
+ super.setContentView(R.layout.abstract_fullscreen_activity);
} else {
super.setContentView(R.layout.abstract_activity);
}
diff --git a/app/src/main/res/layout/abstract_fullscreen_activity.xml b/app/src/main/res/layout/abstract_fullscreen_activity.xml
new file mode 100644
index 00000000..7ca9b936
--- /dev/null
+++ b/app/src/main/res/layout/abstract_fullscreen_activity.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.DrawerLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <!-- The main content view -->
+ <FrameLayout
+ android:id="@+id/content_frame"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+ <!-- The navigation drawer -->
+ <android.support.design.widget.NavigationView
+ android:id="@+id/left_drawer"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="start"/>
+</android.support.v4.widget.DrawerLayout>