开发者

How to delete background of rounded corner popup window?

I created a popup window with rounded corners in a fragment but when I open it I can see a dark background behind the popup. Can you tell how to delete it or make ir transparent?

I'm using kotlin.

This is my fragment code (the activity with an image that opens the popup on click):

`

class ProfileFragment : Fragment() {

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the开发者_运维知识库 layout for this fragment
        return inflater.inflate(R.layout.fragment_profile, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        val bpMore: ImageView = view.findViewById(R.id.ic_bp_more)

        bpMore.setOnClickListener {
            val showPopUp = BadgesPopUpFragment()
            showPopUp.show((activity as AppCompatActivity).supportFragmentManager, "showPopUp")
        }
    }

`

And this is my popup fragment code (popup window):

`

class BadgesPopUpFragment : DialogFragment() {

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_badges_pop_up, container, false)
    }
}

`

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜