|
|
|
|
@ -2,22 +2,22 @@ package com.fongmi.android.tv.ui.fragment; |
|
|
|
|
|
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.view.LayoutInflater; |
|
|
|
|
import android.view.View; |
|
|
|
|
import android.view.ViewGroup; |
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
import androidx.fragment.app.Fragment; |
|
|
|
|
import androidx.leanback.widget.ArrayObjectAdapter; |
|
|
|
|
import androidx.leanback.widget.ItemBridgeAdapter; |
|
|
|
|
import androidx.leanback.widget.ListRow; |
|
|
|
|
import androidx.lifecycle.ViewModelProvider; |
|
|
|
|
import androidx.viewbinding.ViewBinding; |
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.R; |
|
|
|
|
import com.fongmi.android.tv.bean.Filter; |
|
|
|
|
import com.fongmi.android.tv.bean.Vod; |
|
|
|
|
import com.fongmi.android.tv.databinding.FragmentVodBinding; |
|
|
|
|
import com.fongmi.android.tv.model.SiteViewModel; |
|
|
|
|
import com.fongmi.android.tv.ui.activity.BaseFragment; |
|
|
|
|
import com.fongmi.android.tv.ui.activity.CollectActivity; |
|
|
|
|
import com.fongmi.android.tv.ui.activity.DetailActivity; |
|
|
|
|
import com.fongmi.android.tv.ui.custom.CustomRowPresenter; |
|
|
|
|
@ -34,7 +34,7 @@ import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
public class VodFragment extends Fragment implements CustomScroller.Callback, VodPresenter.OnClickListener { |
|
|
|
|
public class VodFragment extends BaseFragment implements CustomScroller.Callback, VodPresenter.OnClickListener { |
|
|
|
|
|
|
|
|
|
private HashMap<String, String> mExtend; |
|
|
|
|
private FragmentVodBinding mBinding; |
|
|
|
|
@ -61,17 +61,15 @@ public class VodFragment extends Fragment implements CustomScroller.Callback, Vo |
|
|
|
|
return fragment; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
|
@Override |
|
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
|
|
|
|
mBinding = FragmentVodBinding.inflate(inflater, container, false); |
|
|
|
|
mFilters = Filter.arrayFrom(getFilter()); |
|
|
|
|
mExtend = new HashMap<>(); |
|
|
|
|
return mBinding.getRoot(); |
|
|
|
|
protected ViewBinding getBinding(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) { |
|
|
|
|
return mBinding = FragmentVodBinding.inflate(inflater, container, false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { |
|
|
|
|
protected void initView() { |
|
|
|
|
mFilters = Filter.arrayFrom(getFilter()); |
|
|
|
|
mExtend = new HashMap<>(); |
|
|
|
|
setRecyclerView(); |
|
|
|
|
setViewModel(); |
|
|
|
|
getVideo(); |
|
|
|
|
|