Android Open Source - Amppercent7 Adapter Chat






From Project

Back to project page Amppercent7.

License

The source code is released under:

GNU General Public License

If you think the Android project Amppercent7 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 my.amppercent.adapters;
/*from   www . ja  va2  s.com*/
import java.util.List;

import my.amppercent.project.R;
import my.amppercent.remoteservice.IFMessage;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;

public class AdapterChat extends AdapterElems<IFMessage> {

  public AdapterChat(Context context, int resource, int textViewResourceId,
      IFMessage[] objects) {
    super(context, resource, textViewResourceId, objects);
  }

  public AdapterChat(Context context, int resource, int textViewResourceId,
      List<IFMessage> objects) {
    super(context, resource, textViewResourceId, objects);
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    if (getItem(position) == null)
      Log.e("error", "nullo");
    String[] s = getItem(position).getArray();

    View row = super.getView(position, convertView, parent);
    int[] fields = { R.id.Username_text, R.id.Body_message };
    for (int i = 0; i < fields.length; i++) {
      Object obj = row.findViewById(fields[i]);
      if (obj instanceof TextView) {
        ((TextView) obj).setText(s[i]);
      } else if (obj instanceof EditText) {
        ((EditText) obj).setText(s[i]);
      }
    }
    return row;
  }

}




Java Source Code List

my.amppercent.adapters.AdapterChat.java
my.amppercent.adapters.AdapterElems.java
my.amppercent.adapters.AdapterIM.java
my.amppercent.adapters.AdapterUStatus.java
my.amppercent.adapters.ListViewAdapting.java
my.amppercent.adapters.ListView_XUser.java
my.amppercent.chatrequest.AvailabilitySettings.java
my.amppercent.chatrequest.SelectConnActivity.java
my.amppercent.chatrequest.connActivity.java
my.amppercent.chatrequest.serverActivity.java
my.amppercent.chattables.UberChat.java
my.amppercent.chattables.XConnect.java
my.amppercent.chattables.XRoster.java
my.amppercent.chattables.myChat.java
my.amppercent.project.Amppercent4Activity.java
my.amppercent.project.DownloadManager.java
my.amppercent.project.IBindRemoteService.java
my.amppercent.project.LaunchMe.java
my.amppercent.project.PrefActive.java
my.amppercent.project.TabFragment.java
my.amppercent.project.TextEntryActivity.java
my.amppercent.remoteservice.IFMessage.java
my.amppercent.remoteservice.IntentManage.java
my.amppercent.remoteservice.XUser.java
my.amppercent.remoteservice.chatAdapter.java
my.amppercent.types.Couple.java
my.amppercent.types.State.java
my.amppercent.types.myATask.java
my.amppercent.types.myNotification.java
my.amppercent.types.myYesNoDialog.java
my.amppercent.types.newActivity.java
org.jivesoftware.smackx.filetransfer.myOutgoingFileTransfer.java