package com.youra.qlicker.Acitvitys.Espace;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.youra.qlicker.Adapters.EspaceAdapter;
import com.youra.qlicker.R;

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

public class EspaceAnoneymeActivity extends AppCompatActivity {

    private EspaceAdapter adapter;
    private List<String> items;
    private RecyclerView recycle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_espace_anoneyme);

        recycle= (RecyclerView)findViewById(R.id.recycler_v);

        /// fill list
        fillList();

        //Recycle view
        recycle.setHasFixedSize(true);   // is fixed interior element
        recycle.setLayoutManager( new GridLayoutManager( this , 2));
        adapter = new EspaceAdapter(items , this);
        recycle.setAdapter(adapter);

    }
    private void fillList(){
        items = new ArrayList<>();
        items.add( "Devenir client BMCI");
        items.add( "Découvrir nos offres");
        items.add( "Mes Produits");
        items.add( "Mes documents");
        items.add( "Mes Cartes");
        items.add( "Mes Assurances");
        items.add( "Mes Crédits");
        items.add( "Ajouter");



    }
}