Skip to content

Commit ca944f4

Browse files
Fix some theming issues
1 parent 089c6b8 commit ca944f4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import android.content.Intent
99
import android.content.IntentFilter
1010
import android.content.SharedPreferences.OnSharedPreferenceChangeListener
1111
import android.content.pm.ActivityInfo
12+
import android.content.res.ColorStateList
1213
import android.database.ContentObserver
13-
import android.graphics.Color
1414
import android.graphics.Rect
1515
import android.os.Build
1616
import android.os.Bundle
@@ -44,6 +44,7 @@ import androidx.core.net.toUri
4444
import androidx.core.os.postDelayed
4545
import androidx.core.view.isGone
4646
import androidx.core.view.isVisible
47+
import androidx.core.widget.ImageViewCompat
4748
import androidx.preference.PreferenceManager
4849
import coil3.util.CoilUtils
4950
import com.evernote.android.state.State
@@ -269,7 +270,7 @@ class VideoDetailFragment :
269270
): View {
270271
val newBinding = FragmentVideoDetailBinding.inflate(inflater, container, false)
271272
nullableBinding = newBinding
272-
return newBinding.getRoot()
273+
return newBinding.root
273274
}
274275

275276
override fun onPause() {
@@ -555,6 +556,13 @@ class VideoDetailFragment :
555556
binding.viewPager.setAdapter(pageAdapter)
556557
binding.tabLayout.setupWithViewPager(binding.viewPager)
557558

559+
val controlTint = ColorStateList.valueOf(
560+
ThemeHelper.resolveColorFromAttr(activity, android.R.attr.colorPrimary)
561+
)
562+
ImageViewCompat.setImageTintList(binding.overlayPlayPauseButton, controlTint)
563+
ImageViewCompat.setImageTintList(binding.overlayPlayQueueButton, controlTint)
564+
ImageViewCompat.setImageTintList(binding.overlayCloseButton, controlTint)
565+
558566
binding.detailThumbnailRootLayout.requestFocus()
559567

560568
binding.detailControlsPlayWithKodi.isVisible =
@@ -1785,9 +1793,6 @@ class VideoDetailFragment :
17851793
}
17861794
activity.window.decorView.systemUiVisibility = 0
17871795
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
1788-
activity.window.statusBarColor = ThemeHelper.resolveColorFromAttr(
1789-
requireContext(), android.R.attr.colorPrimary
1790-
)
17911796
}
17921797

17931798
private fun hideSystemUi() {
@@ -1819,11 +1824,6 @@ class VideoDetailFragment :
18191824
visibility = visibility or View.SYSTEM_UI_FLAG_FULLSCREEN
18201825
}
18211826
activity.window.decorView.systemUiVisibility = visibility
1822-
1823-
if (isInMultiWindow || this.isFullscreen) {
1824-
activity.window.statusBarColor = Color.TRANSPARENT
1825-
activity.window.navigationBarColor = Color.TRANSPARENT
1826-
}
18271827
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
18281828
}
18291829

0 commit comments

Comments
 (0)