Android Open Source - Sortr Simple String Adapter






From Project

Back to project page Sortr.

License

The source code is released under:

Apache License

If you think the Android project Sortr 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.brownapps.sortr.utility;
//from   ww  w  .j a  v  a2 s.c  om
import java.util.List;

import com.brownapps.sortr.R;

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 SimpleStringAdapter extends ArrayAdapter<String> {

  public SimpleStringAdapter(Context context, int textViewResourceId,
      List<String> objects) {
    super(context, textViewResourceId, objects);
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    
    View view = convertView;
    
    if(view == null){
      LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      view = inflater.inflate(R.layout.clickable_item, null);
    }
    
    TextView text = (TextView) view.findViewById(R.id.display_text);
    text.setText(getItem(position));
    
    // TODO Auto-generated method stub
    return view;
  }
  
  

}




Java Source Code List

com.brownapps.sortr.data.ClickableItem.java
com.brownapps.sortr.data.DataLayer.java
com.brownapps.sortr.data.GeneratedTeams.java
com.brownapps.sortr.data.PlayerList.java
com.brownapps.sortr.data.TeamNames.java
com.brownapps.sortr.data.Team.java
com.brownapps.sortr.pages.MainActivity.java
com.brownapps.sortr.pages.PersonsListPage.java
com.brownapps.sortr.pages.SessionPage.java
com.brownapps.sortr.pages.SortrPage.java
com.brownapps.sortr.pages.TeamsPage.java
com.brownapps.sortr.utility.ClickableItemAdapter.java
com.brownapps.sortr.utility.Consts.java
com.brownapps.sortr.utility.IGroupableObject.java
com.brownapps.sortr.utility.Logging.java
com.brownapps.sortr.utility.SimpleStringAdapter.java
com.brownapps.sortr.utility.SortedGroupAdapter.java