package com.jld.vod.view.fragment

import android.content.Intent
import android.widget.ImageView
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.lifecycleScope
import androidx.paging.LoadState
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.jld.kotilntest.room.adapter.BrowserAdapter
import com.jld.vod.R
import com.jld.vod.base.BaseFragment
import com.jld.vod.model.bean.BaseBean
import com.jld.vod.model.bean.BrowserBean
import com.jld.vod.model.bean.ModelAllBean
import com.jld.vod.utils.AppUtil
import com.jld.vod.utils.LogUtils
import com.jld.vod.utils.SharedPrefUtils
import com.jld.vod.view.AboutActivity
import com.jld.vod.view.OrderActivity
import com.jld.vod.view.WebActivity
import com.jld.vod.viewmodel.BrowserViewModel
import com.jld.vod.viewmodel.MainViewModel
import com.xuexiang.xpage.annotation.Page
import com.xuexiang.xpage.enums.CoreAnim
import com.xuexiang.xui.widget.actionbar.TitleBar
import kotlinx.android.synthetic.main.fragment_order.*
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest

@Page(anim = CoreAnim.none)
class OrderFragment : BaseFragment() {

    private lateinit var iv_order:ImageView
    override fun getLayoutId(): Int {
        return R.layout.fragment_order
    }

    override fun initViews() {

        iv_order = findViewById(R.id.iv_order)

        iv_order.setOnClickListener {
            val intent = Intent(activity, OrderActivity::class.java)
            startActivity(intent)
        }
    }

    override fun initTitle(): TitleBar? {
        return null
    }
}