Android Open Source - SSPIA Custom Info Adapter

From Project

Back to project page SSPIA.


The source code is released under:

MIT License

If you think the Android project SSPIA 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.fiec.sspia.util;
/* ww w .  j a  va2  s . c om*/
import com.fiec.ssapp.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class CustomInfoAdapter extends BaseAdapter{
  private LayoutInflater inflater;
  private String[] res, tag;
  private int _PLANET;
  public CustomInfoAdapter(Context context, String[] res, String[] tag, int planet) {
    this.res = res;
    this.tag = tag;
    this._PLANET = planet;
    inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

  public int getCount() {
    return res.length;

  public Object getItem(int position) {
    // TODO Auto-generated method stub
    return null;

  public long getItemId(int position) {
    // TODO Auto-generated method stub
    return 0;

  public View getView(int position, View convertView, ViewGroup parent) {
    String aux = "";
    View view = convertView;
    TextView tags, info;
    view = inflater.inflate(R.layout.info_list, null);
    tags = (TextView)view.findViewById(;
    info = (TextView)view.findViewById(;
    case 0: if(position >=0 && position <=2)
          aux = "?C";        
    case 1: if(position >=0 && position <=1)
          aux = "?C";
      case 0: res[position] = "420"; break;
      case 2: res[position] = "-220"; break;
    return view;

Java Source Code List