Android Open Source - class_board_app Custom Adapter






From Project

Back to project page class_board_app.

License

The source code is released under:

GNU General Public License

If you think the Android project class_board_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.

Java Source Code

package com.parse.starter;
/*w ww  . ja v  a2s .  c o  m*/


import com.parse.ParseQueryAdapter;
import com.parse.ParseUser;

import android.content.Context;
import android.widget.ArrayAdapter;
import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.TextView;

public class CustomAdapter extends ParseQueryAdapter<ParseUser>{

  Context context;

public CustomAdapter(Context context, Class clazz) {
    super(context, clazz);
    this.context=context;
    // TODO Auto-generated constructor stub
  }

private static class Dataholder
{
  TextView tx;
  CheckBox cb;
}

  

  public View getItemView(ParseUser object, View Cv, ViewGroup parent) {
    
    Dataholder holder=new Dataholder();
    
      if (Cv == null) {
        Cv = View.inflate(getContext(), R.layout.row, null); 
        TextView name = (TextView) Cv.findViewById(R.id.te1);
          CheckBox cb = (CheckBox) Cv.findViewById(R.id.cB1);
        holder.tx=name;
        holder.cb=cb;

        Cv.setTag(holder);
      }
      
     
        
     
        
     holder=(Dataholder)Cv.getTag();
     holder.tx.setText(object.getUsername());

     holder.cb.setOnCheckedChangeListener((GroupActivity)context); 
      
     
      return Cv;
    }
     
    
    
  
  
  
}




Java Source Code List

com.parse.starter.CustomAdapter.java
com.parse.starter.Datamodel.java
com.parse.starter.GroupActivity.java
com.parse.starter.LoginActivity.java
com.parse.starter.NewPostActivity.java
com.parse.starter.ParseApplication.java
com.parse.starter.PostListActivity.java
com.parse.starter.Post.java
com.parse.starter.RouteActivity.java
com.parse.starter.ScriptActivity.java
com.parse.starter.SignUpActivity.java
com.parse.starter.SignUpOrLogInActivity.java