Skip to content

Commit

Permalink
Perform version check when setting crop activity status bar color
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Jan 20, 2025
1 parent 745bcdd commit e933fb2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,10 @@ class MySiteFragment : Fragment(R.layout.my_site_fragment),
val context = activity ?: return
val options = UCrop.Options()
options.setShowCropGrid(false)
// TODO options.setStatusBarColor(context.getColorFromAttribute(android.R.attr.statusBarColor))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
@Suppress("DEPRECATION")
options.setStatusBarColor(context.getColorFromAttribute(android.R.attr.statusBarColor))
}
options.setToolbarColor(context.getColorFromAttribute(R.attr.wpColorAppBar))
options.setToolbarWidgetColor(context.getColorFromAttribute(com.google.android.material.R.attr.colorOnSurface))
options.setAllowedGestures(UCropActivity.SCALE, UCropActivity.NONE, UCropActivity.NONE)
Expand Down

0 comments on commit e933fb2

Please sign in to comment.