...
|
...
|
@@ -8,6 +8,8 @@ import androidx.core.content.ContextCompat |
|
|
import com.br_technology.securitytrain_master.R
|
|
|
import com.br_technology.securitytrain_master.databinding.PopClassifyBinding
|
|
|
import com.br_technology.securitytrain_master.expand.addItemDecoration
|
|
|
import com.br_technology.securitytrain_master.expand.dp2px
|
|
|
import com.br_technology.securitytrain_master.expand.screenHeight
|
|
|
import com.br_technology.securitytrain_master.expand.screenWidth
|
|
|
import com.br_technology.securitytrain_master.ui.home.adapter.TextCourseTypeAdapter
|
|
|
import com.br_technology.securitytrain_master.view.listener.OnItemClickListener
|
...
|
...
|
@@ -26,9 +28,19 @@ class ClassifyPop(context: Activity) : PopupWindow(context) { |
|
|
init {
|
|
|
contentView = binding.root
|
|
|
width = contentView.screenWidth()
|
|
|
height = height
|
|
|
setBackgroundDrawable(ContextCompat.getDrawable(context, R.color.white))
|
|
|
height = 252.dp2px()
|
|
|
setBackgroundDrawable(ContextCompat.getDrawable(context, android.R.color.transparent))
|
|
|
isOutsideTouchable = false
|
|
|
|
|
|
// val attributes = context.window.attributes
|
|
|
// attributes.alpha = 0.5f
|
|
|
// context.window.attributes = attributes
|
|
|
//
|
|
|
// setOnDismissListener {
|
|
|
// val attributes = context.window.attributes
|
|
|
// attributes.alpha = 1f
|
|
|
// context.window.attributes = attributes
|
|
|
// }
|
|
|
|
|
|
binding.apply {
|
|
|
courseType.addItemDecoration(3, 14)
|
...
|
...
|
@@ -53,6 +65,12 @@ class ClassifyPop(context: Activity) : PopupWindow(context) { |
|
|
})
|
|
|
courseType.adapter = textCourseTypeAdapter
|
|
|
textCourseTypeAdapter.addList(list)
|
|
|
|
|
|
complete.setOnClickListener {
|
|
|
dismiss()
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|