Skip to content

Commit

Permalink
Revert "Revert "Make app fullscreen to match guidelines""
Browse files Browse the repository at this point in the history
This reverts commit 807867a.
  • Loading branch information
Mygod committed Jan 31, 2019
1 parent 78f021c commit e508915
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 11 additions & 0 deletions tv/src/main/java/com/github/shadowsocks/tv/MainFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

package com.github.shadowsocks.tv

import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import androidx.core.os.bundleOf
import androidx.core.view.updateLayoutParams
import androidx.leanback.preference.LeanbackPreferenceDialogFragmentCompat
import androidx.leanback.preference.LeanbackSettingsFragmentCompat
import androidx.preference.*
Expand Down Expand Up @@ -55,4 +59,11 @@ class MainFragment : LeanbackSettingsFragmentCompat() {
}
return super.onPreferenceDisplayDialog(caller, pref)
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
view.findViewById<View>(R.id.settings_preference_fragment_container).updateLayoutParams {
width = ViewGroup.LayoutParams.MATCH_PARENT
}
}
}
3 changes: 0 additions & 3 deletions tv/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
<item name="android:colorButtonNormal">@color/material_accent_200</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Leanback</item>
</style>
</resources>

0 comments on commit e508915

Please sign in to comment.