package com.bokecc.livemodule.view;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class SelectGiftNumAdapter extends BaseAdapter {
    private Context context;
    private String[] strings;

    public SelectGiftNumAdapter(Context context ,String[] strings){
        this.context = context;
        this.strings = strings;
    }

    @Override
    public int getCount() {
        return strings.length;
    }

    @Override
    public Object getItem(int i) {
        return strings[i];
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        TextView textView = new TextView(context);
        textView.setText(strings[i]);
        textView.setGravity(Gravity.CENTER);
        return textView;
    }
}
