From 739e1c01a855568ccd460fa67472f532cf842d99 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 10 Mar 2017 22:15:10 +0100 Subject: [PATCH] couple code style changes --- .../gallery/activities/ViewPagerActivity.kt | 6 +++--- app/src/main/res/layout/activity_settings.xml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index c49551989..f8c464bf4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -100,9 +100,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View supportActionBar?.setBackgroundDrawable(resources.getDrawable(R.drawable.actionbar_gradient_background)) if (config.maxBrightness) { - var attributes = getWindow().getAttributes() - attributes.screenBrightness = 1F - getWindow().setAttributes(attributes) + val attributes = window.attributes + attributes.screenBrightness = 1f + window.attributes = attributes } } diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index a67b7f558..856719ac7 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -149,7 +149,6 @@ -