package com.xunao.effectdemo.activity;

import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.xunao.effectdemo.R;
import com.xunao.effectdemo.adapter.ClassItemAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * author : 程中强
 * e-mail : 740479946@qq.com
 * date : 2022/9/2617:17
 * desc :
 * version: 1.0
 */
public class InClassActivity extends Activity {
	ClassItemAdapter adapter;
	private RecyclerView rv;
	private List<String> list = new ArrayList<>();

	@Override
	protected void onCreate(@Nullable Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_class_list);
		rv = findViewById(R.id.rl_list);
		init();
	}

	void init(){
		for (int i = 0; i < 10; i++) {
			list.add(i+"");
		}
		adapter = new ClassItemAdapter(this,list);
		rv.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL, false));
		rv.setAdapter(adapter);
	}
}
