Skip to content

Commit

Permalink
Revert "Revert "Revert "Revert "Make app fullscreen to match guidelin…
Browse files Browse the repository at this point in the history
…es""""

This reverts commit 57b846d.
  • Loading branch information
Mygod committed Mar 16, 2019
1 parent 50d09e7 commit 0c67ac6
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 0c67ac6

Please sign in to comment.