Android Open Source - WakeMeUp Custom Array Adapter






From Project

Back to project page WakeMeUp.

License

The source code is released under:

GNU General Public License

If you think the Android project WakeMeUp 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.smallcrafts.wakemeup;
/*w w  w  . j a  v  a  2s . c  o  m*/
import java.util.List;

import android.content.Context;
import android.widget.ArrayAdapter;
import android.widget.Filter;

public class CustomArrayAdapter<T> extends ArrayAdapter<T> {
  
  private Filter filter;
  public List<T> items;
  
  @Override
  public Filter getFilter(){
    if (filter == null){
      filter = new NoFilter();
    }
    return filter;
  }

  public CustomArrayAdapter(Context context, int textViewResourceId,
            List<T> objects) {
        super(context, textViewResourceId, objects);
        items = objects;
    }
  
  public CustomArrayAdapter(Context context, int textViewResourceId) {
        super(context, textViewResourceId);
    }
  
  private class NoFilter extends Filter{

    @Override
    protected FilterResults performFiltering(CharSequence constraint) {
      return new FilterResults();
    }

    @Override
    protected void publishResults(CharSequence constraint,
        FilterResults results) {
    }
  }
}




Java Source Code List

com.smallcrafts.wakemeup.AlarmActivity.java
com.smallcrafts.wakemeup.CustomAddress.java
com.smallcrafts.wakemeup.CustomArrayAdapter.java
com.smallcrafts.wakemeup.LocationActivity.java
com.smallcrafts.wakemeup.LocationDaemon.java
com.smallcrafts.wakemeup.MainMenu.java
com.smallcrafts.wakemeup.ServiceActivity.java
com.smallcrafts.wakemeup.SettingsActivity.java
com.smallcrafts.wakemeup.util.SystemUiHiderBase.java
com.smallcrafts.wakemeup.util.SystemUiHiderHoneycomb.java
com.smallcrafts.wakemeup.util.SystemUiHider.java