update fullscreen activity actionbar to gradient

This commit is contained in:
tibbi 2016-12-25 15:37:37 +01:00
parent 81ee5f46f5
commit 240c043422
6 changed files with 17 additions and 3 deletions

View file

@ -86,7 +86,8 @@
android:parentActivityName=".activities.SettingsActivity"/> android:parentActivityName=".activities.SettingsActivity"/>
<activity <activity
android:name=".activities.PhotoVideoActivity"/> android:name=".activities.PhotoVideoActivity"
android:theme="@style/FullScreenTheme"/>
<activity <activity
android:name=".activities.PhotoActivity" android:name=".activities.PhotoActivity"

View file

@ -68,6 +68,11 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentClic
cursor?.close() cursor?.close()
} }
override fun onResume() {
super.onResume()
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
}
private fun sendViewPagerIntent(path: String) { private fun sendViewPagerIntent(path: String) {
Intent(this, ViewPagerActivity::class.java).apply { Intent(this, ViewPagerActivity::class.java).apply {
putExtra(MEDIUM, path) putExtra(MEDIUM, path)

View file

@ -87,6 +87,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
if (!hasStoragePermission()) { if (!hasStoragePermission()) {
finish() finish()
} }
supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background))
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="270"
android:endColor="@android:color/transparent"
android:startColor="@color/actionbar_grey"/>
</shape>

View file

@ -3,5 +3,5 @@
<gradient <gradient
android:angle="90" android:angle="90"
android:endColor="@android:color/transparent" android:endColor="@android:color/transparent"
android:startColor="#BB000000"/> android:startColor="@color/actionbar_grey"/>
</shape> </shape>

View file

@ -6,6 +6,6 @@
<color name="pressed_item_foreground">#33ff6f00</color> <color name="pressed_item_foreground">#33ff6f00</color>
<color name="activated_item_foreground">#99ff6f00</color> <color name="activated_item_foreground">#99ff6f00</color>
<color name="tmb_background">#ff222222</color> <color name="tmb_background">#ff222222</color>
<color name="actionbar_grey">#55000000</color> <color name="actionbar_grey">#AA000000</color>
<color name="light_grey">#aa888888</color> <color name="light_grey">#aa888888</color>
</resources> </resources>