package com.yutou.jianr_mg.views;

import android.os.Bundle;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.alibaba.fastjson.JSON;
import com.yutou.jianr_mg.Adapters.MapUserTeamRecyclierAdapter;
import com.yutou.jianr_mg.Data.GameInfoLog;
import com.yutou.jianr_mg.Data.MapNode;
import com.yutou.jianr_mg.Interfaces.HttpInterface;
import com.yutou.jianr_mg.Network.HttpApi;
import com.yutou.jianr_mg.Network.HttpUtils;
import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.Tools.Utils;

import org.json.JSONObject;

import cn.lemon.view.RefreshRecyclerView;


public class MapUserTeamActivity extends AppCompatActivity {
    private RefreshRecyclerView recyclerView;
    private MapUserTeamRecyclierAdapter adapter;
    private GameInfoLog mapNode;
    private int limit=0;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_favorite);
        recyclerView = findViewById(R.id.recyclerView);
        try {
            mapNode= JSON.parseObject(getIntent().getStringExtra("data"), GameInfoLog.class);
        }catch (Exception e){
            e.printStackTrace();
            Utils.toast(this,"数据异常");
            finish();
            return;
        }
        initView();
        initData();
    }

    void initView() {
        adapter=new MapUserTeamRecyclierAdapter(this);
        recyclerView.setSwipeRefreshColors(0xFF437845, 0xFFE44F98, 0xFF2FAC21);
        recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
        recyclerView.setAdapter(adapter);
    }
    void initData(){

    }
}
