tweak the bottom navigation and status bar of PhotoVideoActivity
This commit is contained in:
parent
635b8b893e
commit
c60f0d5fb2
2 changed files with 18 additions and 3 deletions
|
@ -42,7 +42,6 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.fragment_holder)
|
||||
setTranslucentNavigation()
|
||||
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
|
@ -56,7 +55,15 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.gradient_background_flipped))
|
||||
supportActionBar?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
window.statusBarColor = Color.TRANSPARENT
|
||||
|
||||
if (config.bottomActions) {
|
||||
window.navigationBarColor = Color.TRANSPARENT
|
||||
} else {
|
||||
setTranslucentNavigation()
|
||||
}
|
||||
|
||||
if (config.blackBackground) {
|
||||
updateStatusbarColor(Color.BLACK)
|
||||
}
|
||||
|
@ -273,8 +280,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
showSystemUI(true)
|
||||
}
|
||||
|
||||
val newAlpha = if (mIsFullScreen) 0f else 1f
|
||||
top_shadow.animate().alpha(newAlpha).start()
|
||||
if (!bottom_actions.isGone()) {
|
||||
bottom_actions.animate().alpha(if (mIsFullScreen) 0f else 1f).start()
|
||||
bottom_actions.animate().alpha(newAlpha).start()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/top_shadow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/default_status_action_height"
|
||||
android:background="@drawable/gradient_background_flipped"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/bottom_actions"
|
||||
layout="@layout/bottom_actions"/>
|
||||
|
|
Loading…
Reference in a new issue