Back to project page android_app.
The source code is released under:
Apache License
If you think the Android project android_app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package TabAdapterPackage; //from w ww .j a v a 2 s .c o m import java.util.List; import com.example.t_danbubbletea.R; import models.ContactListObject; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; public class ListContactAdapter extends ArrayAdapter<ContactListObject> { public ListContactAdapter(Context context, List<ContactListObject> objects){ super(context, 0, objects); // call constructor methods from ArrayAdapter } @Override public View getView(int position, View convertView, ViewGroup parent){ ContactListObject contactItem = getItem(position); View view = convertView; // if view returns null for any reason if(view == null){ LayoutInflater layoutInflate = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = layoutInflate.inflate(R.layout.card_list_item,parent, false); } //set up text view for items in list TextView textView1 = (TextView) view.findViewById(R.id.textView1); textView1.setText("Phone Number: (541) 777-0528"); return view; } }