Android Open Source - AndroidFileBroadcast Custom Adaptor






From Project

Back to project page AndroidFileBroadcast.

License

The source code is released under:

Apache License

If you think the Android project AndroidFileBroadcast 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.bucketdevelopers.uft;
// w  ww .j  a  va 2s. c  o  m
import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class CustomAdaptor extends ArrayAdapter<String> {
   private final Context context;
   private final List<String> values;
   private final ArrayList<Integer> selectedItems;

  public CustomAdaptor(Context context, List<String> objects, ArrayList<Integer> selected) {
    super(context, R.layout.list_text, objects);
    this.context = context;
      this.values = objects ;
      this.selectedItems = selected;
    // TODO Auto-generated constructor stub
  }
  
   @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      LayoutInflater inflater = (LayoutInflater) context
          .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView = inflater.inflate(R.layout.list_text, parent, false);
      TextView textView = (TextView) rowView.findViewById(R.id.tv_list);
      textView.setText(values.get(position));
      if(selectedItems.contains((Integer)position))
      {
        textView.setTextColor(Color.BLUE);
      }
      return rowView;
    }

}




Java Source Code List

com.bucketdevelopers.uft.CustomAdaptor.java
com.bucketdevelopers.uft.File_Download.java
com.bucketdevelopers.uft.FullScreenQRCode.java
com.bucketdevelopers.uft.Listpage.java
com.bucketdevelopers.uft.MainActivity.java
com.bucketdevelopers.uft.MyFragment.java
com.bucketdevelopers.uft.MyPageAdapter.java
com.bucketdevelopers.uft.ReceivedListHandler.java
com.bucketdevelopers.uft.ReceivedPage.java
com.bucketdevelopers.uft.Screen1.java
com.bucketdevelopers.uft.ServerService.java
com.common.methods.AlertCreator.java
com.common.methods.AvailableSpaceHandler.java
com.common.methods.ClearCache.java
com.common.methods.ExternalStorage.java
com.common.methods.IntentHelper.java
com.common.methods.IpAddress.java
com.common.methods.MimeUtils.java
com.common.methods.XMLDOMParser.java
com.common.methods.XmlParser.java
com.common.methods.qrcodelibrary.Contents.java
com.common.methods.qrcodelibrary.QRCodeEncoder.java
com.common.methods.assetsOperation.java
com.library.Httpdserver.NanoHTTPD.java