Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.zeevm.mygroupchat;
- import android.content.Context;
- import android.view.View;
- import android.view.ViewGroup;
- import android.widget.BaseAdapter;
- import android.widget.TextView;
- import java.util.List;
- /**
- * Created by zeevm on 05/12/2016.
- */
- public class MsgAdapter extends BaseAdapter {
- Context context;
- List<String> myMsgList;
- public MsgAdapter(Context context,List<String> myMsgList)
- {
- this.context=context;
- this.myMsgList=myMsgList;
- }
- @Override
- public int getCount() {
- return myMsgList.size();
- }
- @Override
- public Object getItem(int i) {
- return null;
- }
- @Override
- public long getItemId(int i) {
- return 0;
- }
- @Override
- public View getView(int i, View view, ViewGroup viewGroup) {
- TextView myMsg = new TextView(context);
- myMsg.setText(myMsgList.get(i));
- return myMsg;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement