Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tateisu committed Dec 27, 2019
1 parent 971d06b commit 100e797
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 0 additions & 6 deletions app/src/main/java/jp/juggler/screenshotbutton/ActMain.kt
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ class ActMain : AppCompatActivity(), View.OnClickListener {

}

private var Button.isEnabledWithColor : Boolean
get() = isEnabled
set(value){
isEnabled = value
alpha = if(isEnabled) 1f else 0.5f
}

// 権限のチェックと取得インタラクションの開始
// 画面表示時や撮影ボタンの表示開始時に呼ばれる
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/java/jp/juggler/util/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import android.provider.Settings
import android.util.DisplayMetrics
import android.view.View
import android.view.WindowManager
import android.widget.Button
import jp.juggler.screenshotbutton.API_APPLICATION_OVERLAY


Expand Down Expand Up @@ -162,4 +163,11 @@ fun String?.toUriOrNull() =
Uri.parse(this)
} catch (ex: Throwable) {
null
}
}

var View.isEnabledWithColor : Boolean
get() = isEnabled
set(value){
isEnabled = value
alpha = if(value) 1f else 0.5f
}

0 comments on commit 100e797

Please sign in to comment.