Skip to content

Commit

Permalink
Closes #1037: Better fix for fullscreen issue that doesn't break norm…
Browse files Browse the repository at this point in the history
…al viewing
  • Loading branch information
daneren2005 committed Dec 30, 2020
1 parent e40c1bd commit 46986db
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ public void finish() {
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);
}
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/layout/abstract_fullscreen_activity.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 46986db

Please sign in to comment.