package com.qimai.android.widgetlib.popup

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.qimai.android.widgetlib.R
import kotlinx.android.synthetic.main.loading.view.*

/**
 *   created by wangwei   ON 2019-10-21  email:wangwei_5521@163.com
 *   @version 1.1.1
 *   @Description
 **/
class Loading : androidx.fragment.app.DialogFragment() {

    private lateinit var rootView: View

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        super.onCreateView(inflater, container, savedInstanceState)
        val root = inflater.inflate(R.layout.loading, container, false)
        rootView = root
        return root
    }

    fun changeLoadText(loadingText: String) {
        rootView.text.text = loadingText
    }

    fun show(manager: androidx.fragment.app.FragmentManager) {
        show(manager, "loading")
    }


}