File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
library/src/main/java/cn/jailedbird/edgeutils Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ internal object EdgeControl {
141
141
val res = ViewCompat .getRootWindowInsets(this .decorView)
142
142
if (res == null ) {
143
143
Toast .makeText(
144
- context,
144
+ context.applicationContext ,
145
145
" ViewCompat.getRootWindowInsets(this.decorView) is null, please use View.post{ called_api } to ensure View has Attached" ,
146
146
Toast .LENGTH_SHORT
147
147
).show()
Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ import cn.jailedbird.edgeutils.EdgeControl.showSystemBar
38
38
* */
39
39
object EdgeUtils {
40
40
@JvmStatic
41
- fun setEdgeToEdge (activity : Activity , withScrim : Boolean = false ) =
41
+ fun setEdgeToEdge (activity : Activity , withScrim : Boolean = true ) =
42
42
activity.edgeToEdge(withScrim)
43
43
44
44
/* *
45
45
* Make activity implement edge-to-edge layout--> first step
46
46
*
47
47
* [withScrim] if true, set background as TRANSPARENT(alpha=0) else TRANSPARENT(alpha=1)
48
48
* */
49
- fun Activity.edgeToEdge (withScrim : Boolean = false ) {
49
+ fun Activity.edgeToEdge (withScrim : Boolean = true ) {
50
50
/* *
51
51
* To fix [hide status bar cause black background] please reference this video
52
52
* [youtube course](https://www.youtube.com/watch?v=yukwno2GBoI)
You can’t perform that action at this time.
0 commit comments