Android Open Source - groundify-android My Adapter






From Project

Back to project page groundify-android.

License

The source code is released under:

GNU General Public License

If you think the Android project groundify-android 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 custom.adapter.pckg;
/* w  w w.  j  a v  a  2  s . c om*/
import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import deftsoft.android.iground.utility.ChildDetail;
import deftsoft.iground.android.R;

public class MyAdapter extends BaseAdapter {

  Context context;

  ArrayList<ChildDetail> childDetails;

  private final String TAG = "MyAdapter";

  public MyAdapter(ArrayList<ChildDetail> childDetailList, Context context) {
    // TODO Auto-generated constructor stub

    this.childDetails = childDetailList;

    this.context = context;
  }

  @Override
  public int getCount() {
    // TODO Auto-generated method stub

    return childDetails.size();
  }

  @Override
  public Object getItem(int position) {
    // TODO Auto-generated method stub
    return childDetails.get(position).getChildName();
  }

  @Override
  public long getItemId(int position) {
    // TODO Auto-generated method stub
    return Integer.parseInt(childDetails.get(position).getChildID());
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub

    ViewHolder holder;

    LayoutInflater layoutInflater = (LayoutInflater) context
        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    if (convertView == null) {

      holder = new ViewHolder();

      convertView = layoutInflater.inflate(R.layout.listinflate, null);

      holder.text = (TextView) convertView

      .findViewById(R.id.listinflate_textView);

      convertView.setTag(holder);

    }

    else {

      holder = (ViewHolder) convertView.getTag();

    }

    holder.text.setText(childDetails.get(position).getChildName());

    return convertView;
  }

  public class ViewHolder {

    private TextView text;
  }
}




Java Source Code List

.ConsequenceImageGridActivity.java
custom.adapter.pckg.GridAdapter.java
custom.adapter.pckg.MyAdapter.java
custom.adapter.pckg.MyLazyAdapter.java
custom.adapter.pckg.MySpinnerAdapter.java
deftsoft.android.iground.utility.Base64.java
deftsoft.android.iground.utility.ChildDetail.java
deftsoft.android.iground.utility.DatePickerFragment.java
deftsoft.android.iground.utility.DeleteChildWebResponse.java
deftsoft.android.iground.utility.GetNewCosequence.java
deftsoft.android.iground.utility.HttpUploader.java
deftsoft.android.iground.utility.ImageFilePath.java
deftsoft.android.iground.utility.SetConSeqWebServiceWebResponse.java
deftsoft.android.iground.utility.SignupDetail.java
deftsoft.android.iground.utility.TimePickerFragment.java
deftsoft.android.iground.utility.Utility.java
deftsoft.android.iground.utility.ViewConseqDetail.java
deftsoft.android.iground.utility.WebServiceLinks.java
deftsoft.android.iground.utility.WebServiceResponse.java
deftsoft.android.image.upload.Base64.java
deftsoft.android.image.upload.UploadImageToServer.java
deftsoft.iground.android.AddChildScreen.java
deftsoft.iground.android.AddConsequenceActivity.java
deftsoft.iground.android.BridgeClass.java
deftsoft.iground.android.CopyOfConsequenceImageGridActivity.java
deftsoft.iground.android.DeleteChildScreen.java
deftsoft.iground.android.GrounChild.java
deftsoft.iground.android.HomeScreenActivity.java
deftsoft.iground.android.Home.java
deftsoft.iground.android.LogInScreenActivity.java
deftsoft.iground.android.MyHttpClient.java
deftsoft.iground.android.SignUpScreenActivity.java
deftsoft.iground.android.ThankYouActivity.java
deftsoft.iground.android.UILApplication.java
deftsoft.iground.android.ViewConsequence.java
deftsoft.iground.android.CustomizeListView.AbsListViewBaseActivity.java
deftsoft.iground.android.CustomizeListView.BaseActivity.java
deftsoft.iground.android.CustomizeListView.Constants.java
iground.child.interfaces.Consequnceselected.java