Android Open Source - ListIndex Item






From Project

Back to project page ListIndex.

License

The source code is released under:

Apache License

If you think the Android project ListIndex 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.nozomi.listindex.demo;
//w  w w  . ja  va2  s .  c om
import com.nozomi.listindex.view.IndexString;

public class Item implements IndexString {

  private String name;
  private int pic;

  public Item(String name, int pic) {
    super();
    this.name = name;
    this.pic = pic;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public int getPic() {
    return pic;
  }

  public void setPic(int pic) {
    this.pic = pic;
  }

  @Override
  public char getFirstChar() {
    char c = name.charAt(0);
    if (c >= 'a' && c <= 'z') {
      c = (char) (c - 'a' + 'A');
    }
    return c;
  }

  @Override
  public String getString() {
    return name;
  }

}




Java Source Code List

com.nozomi.listindex.demo.Item.java
com.nozomi.listindex.demo.MainActivity.java
com.nozomi.listindex.view.IndexComparator.java
com.nozomi.listindex.view.IndexString.java
com.nozomi.listindex.view.IndexView.java