Android Open Source - AndroidSectionHeaders Section






From Project

Back to project page AndroidSectionHeaders.

License

The source code is released under:

Apache License

If you think the Android project AndroidSectionHeaders 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.marczych.androidsectionheaders;
//from w ww .  j a  v  a 2 s. c o  m
import android.view.ViewGroup;
import android.view.View;

import android.widget.AdapterView;
import android.widget.BaseAdapter;

public abstract class Section extends BaseAdapter {
   /**
    * Analogous to BaseAdapter's getItem method but for the header
    */
   public abstract Object getHeaderItem();

   /**
    * Analogous to BaseAdapter's getView method but for the header
    */
   public abstract View getHeaderView(View convertView, ViewGroup parent);

   /**
    * Called from SectionHeaderAdapter.onItemClick. Position is relative
    * to the list and does not include the header
    */
   public void onItemClick(AdapterView<?> adapterView, View view,
    int position, long longid) {
      // Do nothing by default
   }
}




Java Source Code List

com.marczych.androidsectionheaders.SectionHeadersAdapter.java
com.marczych.androidsectionheaders.SectionListView.java
com.marczych.androidsectionheaders.Section.java
com.marczych.androidsectionheaders.sample.SampleSectionAdapter.java
com.marczych.androidsectionheaders.sample.SectionHeadersSampleActivity.java