Android Open Source - Fabby-Chat Chat Content Adapter






From Project

Back to project page Fabby-Chat.

License

The source code is released under:

MIT License

If you think the Android project Fabby-Chat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.fabbychat.adapters;
//from w  w w.ja  v a  2 s  .c o m
import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.fabbychat.R;

public class ChatContentAdapter extends ArrayAdapter<String> {
  
  private static String TAG = "ChatContentAdapter";
  
  public ChatContentAdapter(Context context) {
    super(context, android.R.layout.simple_list_item_1,
      new ArrayList<String>());
  }
  
  @Override
  public View getView(int pos, View convertView, ViewGroup parent) {
        View v = convertView;
        if (v == null) {
            LayoutInflater vi = (LayoutInflater)
              getContext().
              getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.chat_content_row, null);
        }
        String msg = super.getItem(pos);
        TextView msgView = (TextView) v.findViewById(R.id.message);
        msgView.setText(msg);   

        return v;
  }
}




Java Source Code List

com.fabbychat.Application.java
com.fabbychat.ChatDialog.java
com.fabbychat.ChatDialogs.java
com.fabbychat.Contacts.java
com.fabbychat.FbAvatarProducer.java
com.fabbychat.FbChatConnection.java
com.fabbychat.FbChatService.java
com.fabbychat.Login.java
com.fabbychat.adapters.ChatContentAdapter.java
com.fabbychat.adapters.FbContactAdapter.java
com.fabbychat.models.FbContact.java
com.fabbychat.sasl.SASLFacebookMechanism.java
com.fabbychat.utils.DrawableManager.java
com.fabbychat.utils.DrawableProducer.java
com.fabbychat.utils.URLDrawableProducer.java