mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-07-09 23:49:52 +02:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf6a3cac4a | |||
| fce90cf88a | |||
| 3346221569 | |||
| 9355a0cef1 | |||
| 45915ca560 | |||
| 78920ef486 | |||
| 7d58fb502a | |||
| e2308387fa | |||
| e3b1f4f93b | |||
| 08484e055d | |||
| 05da27331f | |||
| 0087b871a1 | |||
| 8469ce4984 | |||
| a24a8986e1 | |||
| 28c5510417 | |||
| 2cd35a7e77 | |||
| 4cff153402 | |||
| 01e43a8e29 | |||
| e8b0e4538b | |||
| c7778e15be | |||
| 6ccd068da8 | |||
| 9893181498 | |||
| 61ff89e114 | |||
| d9f7e84daa | |||
| c9abe2a167 |
+3
-8
@@ -64,16 +64,10 @@ class PopupWindow(
|
|||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
private val mParams: WindowManager.LayoutParams = WindowManager.LayoutParams().apply {
|
private val mParams: WindowManager.LayoutParams = WindowManager.LayoutParams().apply {
|
||||||
height = WindowManager.LayoutParams.WRAP_CONTENT
|
height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||||
val displayMetrics = context.resources.displayMetrics
|
width = WindowManager.LayoutParams.MATCH_PARENT
|
||||||
val screenWidthDp = displayMetrics.widthPixels / displayMetrics.density
|
|
||||||
width = if (screenWidthDp >= 600) {
|
|
||||||
(400 * displayMetrics.density).toInt()
|
|
||||||
} else {
|
|
||||||
WindowManager.LayoutParams.MATCH_PARENT
|
|
||||||
}
|
|
||||||
type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
|
type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
|
||||||
format = PixelFormat.TRANSLUCENT
|
format = PixelFormat.TRANSLUCENT
|
||||||
gravity = Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL
|
gravity = Gravity.BOTTOM
|
||||||
dimAmount = 0.3f
|
dimAmount = 0.3f
|
||||||
flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS or
|
flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS or
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN or
|
WindowManager.LayoutParams.FLAG_FULLSCREEN or
|
||||||
@@ -90,6 +84,7 @@ class PopupWindow(
|
|||||||
mParams.x = 0
|
mParams.x = 0
|
||||||
mParams.y = 0
|
mParams.y = 0
|
||||||
|
|
||||||
|
mParams.gravity = Gravity.BOTTOM
|
||||||
mView.setOnClickListener {
|
mView.setOnClickListener {
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user